N = int(input()) s = '' for i in range(N, 0, -1): s += str(i-1) * N print(s)