-- First line of input goes last, last line goes first

module Main where

{-
   (.)      :: (a->b) -> (c->a) -> c -> b ; function composition
   reverse  :: [a] -> [a]                 ; reverse list back to front
   lines    :: String->[String]           ; breaks a string into lines at newlines
   unlines  :: [String] -> String         ; join string list with line terminators
   interact :: (String -> String) -> IO (); the input and output are strings
 -}

main :: IO()
main = interact (unlines . reverse . lines)

--  ------------For GNU Emacs ------------
--  Local Variables:
--  compile-command: "ghc -Wall main2.hs"
--  End: