a=int(input()) arr=list(map(int,input().split())) c=0 for i in range(1,a+1): for j in range(1,a+1): print(i, end=' ') print()