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