: s/\([^0-9]\|^\)0/\1/ /[0-9]/!b1 h y/0123456789/9012345678/ x G s/\([^0-9]*[0-9]*\)[1-9]0*\(.*\)\n[^0-9]*[0-9]*\([0-8]9*\).*/\1\3a\2/ b :1 s/a*$/\U&/ s/AA/AB/g y/AB/10/ h s/ .*// x s/a* // x :2 s/a// G x y/01/10/ x /a/b2 s/.\B/& /g s/ *\n//