Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define fast()(ios_base::sync_with_stdio(0),cin.tie(NULL));
- int main()
- {
- ll t;
- cin>>t;
- while(t--)
- {
- ll n;
- cin>>n;
- if(n<4)cout<<"-1"<<endl;
- else
- {
- ll i;
- if(n%2==1)i=n;
- else i= n-1;
- for(i;i>=1;i-=2)cout<<i<< " ";
- cout<<"4 2 ";
- for(i=6;i<=n;i+=2)cout<<i<< " ";
- cout<<endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement