#include using namespace std; using ll = long long; using P = pair; #define rep(i, a, b) for(ll i = a; i < b; ++i) #define rrep(i, a, b) for(ll i = a; i >= b; --i) constexpr ll inf = 4e18; struct SetupIO { SetupIO() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(30); } } setup_io; int main(void) { int n; cin >> n; if(n == 3 or n == 5) { cout << -1 << '\n'; } else if(n == 1) { cout << 1 << '\n'; } else if(n == 7) { cout << "2 4 6 3" << '\n'; } else if(n == 9) { cout << "2 4 6 3 9" << '\n'; } else if(n == 11) { cout << "3 9 6 2 10 5" << '\n'; } else { vector ans(n / 2); rep(i, 0, n / 2) { ans[i] = 2 * (i + 1); } if(n % 2 == 1) { swap(ans[1], ans[5]); ans.insert(ans.begin() + 2, 3); } rep(i, 0, (int)ans.size()) { cout << ans[i] << " \n"[i + 1 == (int)ans.size()]; } } }