N = int(input()) if N == 1: exit(print(1)) ans = [] for _ in range(N): for j in range(N): ans.append(str(j)) ans.reverse() print(''.join(ans))