while(1): N=int(input()) if(N==0): break mainlist=[] for i in range(0,N): sublist=[] for j in range(0,N): sublist.append(9) mainlist.append(sublist)