Numbering by lpm11

def s(a,m)\x0d
puts " "*(a.size-1)*3+a.join(".") if a.size>0;\x0d
1.upto(3){|i|s(a<<i,m);a.pop} if a.size<m\x0d
end\x0d
s([],gets.to_i);

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top