def main(): N = int(input()) for i in range(3,312457,3): for j in range(4,312457-i,3): if j %3 ==1 and j >= (N-1): ans = [i,j] while N != len(ans): ans.append(ans.pop(1)-1) ans.append(1) print((' ').join(map(str,ans))) return None main()