#include #define rep(i,n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair; int main(){ int n; cin>>n; vector ans; if(n<=2) ans.push_back(1); else if(n%2==1){ if(n>=7){ for(int i=2; i<=n; i+=2) if(i!=6) ans.push_back(i); ans.push_back(6); ans.push_back(3); } } else{ for(int i=2; i<=n; i+=2) ans.push_back(i); } if(ans.size()==0) cout<<(-1)<