#include <bits/stdc++.h>
using namespace std;

struct iofast_t {
    iofast_t() {
        ios::sync_with_stdio(false);
        cin.tie(nullptr);
    }
} iofast;

struct uns_t {} uns;
template <typename Element, typename Head, typename ...Args>
auto vec(Element init, Head arg, Args ...args) {
    if constexpr (sizeof...(Args) == 0) return std::vector(arg, init);
    else return std::vector(arg, vec(init, args...));
}
template <typename Element, typename Head, typename ...Args>
auto vec(uns_t, Head arg, Args ...args) {
    return vec(Element(), arg, args...);
}

template <typename T, typename Compare = less<T>>
T &chmin(T &l, T r, Compare &&f = less<T>()) { return l = min(l, r, f); }
template <typename T, typename Compare = less<T>>
T &chmax(T &l, T r, Compare &&f = less<T>()) { return l = max(l, r, f); }

int main() {
    int n; cin >> n;

    if (n <= 2) {
        cout << n << endl;
        return 0;
    }

    if (n == 4) {
        cout << "2 4" << endl;
        return 0;
    }

    if (n == 3 || n == 5) {
        cout << -1 << endl;
        return 0;
    }

    auto ans = vec<int>(uns, 0);

    for (int i = 1; i <= n / 2; ++i) {
        if (i == 3) {
            continue;
        }
        ans.push_back(2 * i);
    }
    ans.push_back(6);

    if (n % 2 != 0) {
        ans.push_back(3);
    }

    cout << ans[0];
    for (int i = 1; i < (n + 1) / 2; ++i) {
        cout << ' ' << ans[i];
    }
    cout << endl;
}