m@main=do s<-getLine;putStrLn(s#s);m s#(a:t)|s++t==t++s=[a]|0<1=a:s#t