N = int(input()) for i in range(N): for j in range(N): print((j+1)%10,end="") print()