import List r=reverse main=getLine>>=mapM_ putStrLn.map(\x->x++r x).tail.r.tails