N, = map(int, input().split()) for i in range(N): x = (2*i+1)%N if x == 0: x = N print(*(list(range(x, 0, -1))+list(range(N, x, -1))))