*x=n="next" puts"for v1 = 1 to 9",(1..9).map{|i|x=[(s=" "*i*2)+n]+x s+"for v#{i+1} = 0 to 9"}," "*20+"print v#{[*1..10]*',v'}",x