i=v=1 o=[] exec'if i>=len(o):o=[""]+o;i=0\no[i]+=`v`+" ";v+=1;i+=1\n'*input() for l in o:print l[:-1]