#include using namespace std; using ll=long long; #define rep(i,n) for(int i=0;i=0;i--) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin>>N; if(N==1){ cout<<-1<<"\n"; }else if(N==2){ cout<<"1 4 3 6 5 2\n"; }else if(N==5){ cout<<"1 2 3 9 15 10 12 13 14 11 4 5 6 7 8\n"; }else{ vector>v3={{1,2,9},{6,8,7},{3,4,5}}; vector>v4={{1,2,5,12},{8,10,11,9},{3,6,4,7}}; vector>ans(3); int s=0; for(int i=0;i<4;i++){ if((N-3*i)%4==0){ for(int j=0;j