code: def stream_stdin_lines():
      
      stdin = os.fdopen(sys.stdin.fileno(), 'r', 0)
      while True:
          line = stdin.readline()
          if line:
              yield line
          else:
              break
docs: Generator for unbuffered line reading from STDIN