// yuki 1528 Not 1 // 2021.6.5 bal4u #include int getchar_unlocked(void); int putchar_unlocked(int c); #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) int in() { // 非負整数の入力 int n = 0; int c = gc(); do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0'); return n; } void out(int n) { // 非負整数の表示(出力) int i; char b[30]; if (!n) pc('0'); else { i = 0; while (n) b[i++] = n % 10 + '0', n /= 10; while (i--) pc(b[i]); } } int main() { int N, i; N = in(); if (N == 3 || N == 5) puts("-1"); else if (N == 1) puts("1"); else if ((N & 1) == 0) { out(N); while (N > 2) pc(' '), N -= 2, out(N); pc('\n'); } else { --N; while (N > 1) { if (N != 6) out(N), pc(' '); N -= 2; } puts("6 3"); } return 0; }