N = int(input()) if N == 1: print(1) else: output = "" for num in reversed(range(N)): output += str(num)*N print(output)