#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin>>N;
if(N ==1)
{
cout<<1<<endl;
return 0;
}
if(N <= 3)
{
cout<<"NO SOLUTION"<<endl;
return 0;
}
if(N==4)
{
cout<<"2 4 1 3"<<endl;
return 0;
}
int i=1;
int j=N;
vector<int> V;
while(i < j)
{
V.push_back(j);
V.push_back(i);
j--;
i++;
}
if(i == j)
{
V.push_back(i);
}
for(int i=0;i<V.size()-1;i++)
{
if(abs(V[i+1]-V[i]) == 1)
{
int temp =V[i+1];
V[i+1] = V[0];
V[0] = temp;
}
}
for(int i=0;i<V.size();i++)
{
if(i != V.size()-1)
{
cout<<V[i]<<" ";
}
else
{
cout<<V[i]<<endl;
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkKCWludCBOOwoJY2luPj5OOwoJCglpZihOID09MSkKCXsKCQljb3V0PDwxPDxlbmRsOwoJCXJldHVybiAwOwoJfQoJCglpZihOIDw9IDMpCgl7CgkJY291dDw8Ik5PIFNPTFVUSU9OIjw8ZW5kbDsKCQlyZXR1cm4gMDsKCX0KCQoJaWYoTj09NCkKCXsKCQljb3V0PDwiMiA0IDEgMyI8PGVuZGw7CgkJcmV0dXJuIDA7Cgl9CgkKCWludCBpPTE7CglpbnQgaj1OOwoJCgl2ZWN0b3I8aW50PiBWOwoJCgl3aGlsZShpIDwgaikKCXsKCQlWLnB1c2hfYmFjayhqKTsKCQlWLnB1c2hfYmFjayhpKTsKCQlqLS07CgkJaSsrOwoJfQoJaWYoaSA9PSBqKQoJewoJCVYucHVzaF9iYWNrKGkpOwoJfQoJCglmb3IoaW50IGk9MDtpPFYuc2l6ZSgpLTE7aSsrKQoJewoJCWlmKGFicyhWW2krMV0tVltpXSkgPT0gMSkKCQl7CgkJCWludCB0ZW1wID1WW2krMV07CgkJCVZbaSsxXSA9IFZbMF07CgkJCVZbMF0gPSB0ZW1wOwoJCX0KCX0KCQoJZm9yKGludCBpPTA7aTxWLnNpemUoKTtpKyspCgl7CgkJaWYoaSAhPSBWLnNpemUoKS0xKQoJCXsKCQkJY291dDw8VltpXTw8IiAiOwoJCX0KCQllbHNlCgkJewoJCQljb3V0PDxWW2ldPDxlbmRsOwoJCX0KCX0KCQoJCglyZXR1cm4gMDsKfQ==