#include using namespace std; int main(){ int N; cin >> N; vector A; if (N % 2 == 0){ for (int i = 2; i <= N; i += 2){ A.push_back(i); } } else if (N == 1){ A.push_back(1); } else if (N >= 7){ for (int i = 2; i <= N; i += 2){ A.push_back(i); } int cnt = A.size(); for (int i = 0; i < cnt - 1; i++){ if (A[i] % 3 == 0){ swap(A[i], A[cnt - 1]); break; } } A.push_back(3); } if (A.empty()){ cout << -1 << endl; } else { int M = A.size(); for (int i = 0; i < M; i++){ cout << A[i]; if (i < M - 1){ cout << ' '; } } cout << endl; } }