for(l=readline(S=i='');l=l.replace(/\S+/g,function(s)s[+i]?s:S).trimRight(S+=' ');i++)print(l)