for(string s:input('../fd/0',CW,'')){int l=length(s);write(substr(s+substr(s,1,l-2)+s,l-1,l));}