h#(x:a)=zipWith(:)a h#a++h h#x=[] g a=map(:[])a#a m@main=getLine>>=putStrLn.head.filter(\x->x==reverse x).g>>m