n=int(input()) d=[i for i in range(1,n+1)] l=0 for i in range(n): ans=d[l::-1]+d[n-1:l:-1] print(' '.join(map(str, ans))) l=(l+2)%n