n = int(input()) s = '' for i in range(n): s += ''.join([str((i+1)%10)]*n) print(s)