n=int(input()) s="" for i in range(1,n+1): s+=str(i%10)*n print(s)