def open_input_file(filename):
 if (filename is None):
  return sys.stdin
 else:
  try:
   return open(filename, 'rb')
  except IOError as err:
   fatal_error(str(err))

def open_input_file ( filename ) : if ( filename is None ) : return sys . stdin else : try : return open ( filename , 'rb' ) except IOError as err : fatal_error ( str ( err ) )
open file for reading .