(A=0..9).inject(STDOUT.sync=[p]*10){|a,i|A.map{|j|a[i]=j puts a.map{|n|n||0}*"" (9