#!/usr/local/bin/python
# $Id: reversefile.python,v 1.4 2001/05/09 00:47:40 doug Exp $
# http://www.bagley.org/~doug/shootout/
# from Brad Knotwell
# with help from Mark Baker

def main():
    from sys import stdin, stdout
    w = stdin.readlines()
    w.reverse()
    stdout.writelines(w)

main()