W=[] exec"w=[1]\nfor v in W:w+=[[V,[]][V==1]+[v]for V in w]\nW=w;"*input() print`W`.translate(' 0>{,}<0'*32)