> import sys > lines = sys.stdin.readlines() > lines.reverse() > for l in lines: > sys.stdout.write(l)