@l=split//,<>;print@l;pop@l; while($#l>=1){@I=();for$i(1..$#l){push(@I,abs($l[$i-1]-$l[$i]))}print@I,"\n";@l=@I}