while(<>){chomp;for$i(0..(length($p)-1)){$_.=" "if$i>=length;substr($_,$i,1)=substr$p,$i,1 if substr($_,$i,1)eq" "}$p=$_;print$_."\n"}