def f a,b a[0]?a.map{|i|f a-[i],b+[i]}:puts(b*" ")end f [*0..5],[]