A permutation *p* of size *n* is the sequence *p*<sub class="lower-index">1</sub>, *p*<sub class="lower-index">2</sub>, ..., *p*<sub class="lower-index">*n*</sub>, consisting of *n* distinct integers, each of them is from 1 to *n* (1 ≤ *p*<sub class="lower-index">*i*</sub> ≤ *n*).

A lucky permutation is such permutation *p*, that any integer *i* (1 ≤ *i* ≤ *n*) meets this condition *p*<sub class="lower-index">*p*<sub class="lower-index">*i*</sub></sub> = *n* - *i* + 1.

You have integer *n*. Find some lucky permutation *p* of size *n*.
The first line contains integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>) — the required permutation size.
#include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long int
#define ll signed long long int
#define pb push_back
#define mpp make_pair
#define mod 1000000007
#define pi 3.1415926536
#define N 100005
#define pp pair<int,int>
int n,a[100005];
void even()
{
    int l=2,r=n;
    for(int i=1;i<=n/2;i+=2)
    {
        a[i]=l;
        a[i+1]=r;
        l+=2;
        r-=2;
    }
    l=1,r=n-1;
    for(int i=n-1;i>n/2;i-=2)
    {
        a[i]=l;
        a[i+1]=r;
        r-=2;
        l+=2;
    }
}
int main()
{
    cin>>n;
    if(n%4==2 || n%4==3)
    {
        printf("-1");
        return 0;
    }
    even();
    if(n%2)
    {
        a[n/2+1]=n/2+1;
    }
    for(int i=1;i<=n;i++) cout<<a[i]<<" ";
    return 0;
}
