y=$<.r.toi n=[*1..y].j o=y.ti.m{|x|v=n[0,y-x].lj y,' '+n v+v[0..-2].rv} s o+o[0..-2].rv