m@main=do a:x<-getLine;putStrLn$init(last x:x)++[a];m