#!perl -anl @b=map y///c,@F;$s=join'',@F;map{$i=$_;$p=0;print join' ',map{$p+=$_;substr$s,$p-$_,$_}@b;@b[$i,$i+1]=@b[$i+1,$i]}0..$#b