import sys if sys.platform == 'ios': sys.stdin = open('in.txt') n = int(input()) ans=[] for i in range(n): for j in range(n): ans.append(str((j+1)%10)) print(''.join(ans))