A permutation p of size n is the sequence p1, p2, ..., pn, consisting of n distinct integers, each of them is from 1 to n (1 ≤ pi ≤ n).

A lucky permutation is such permutation p, that any integer i (1 ≤ i ≤ n) meets this condition ppi = n - i + 1.

You have integer n. Find some lucky permutation p of size n.

Input

The first line contains integer n (1 ≤ n ≤ 105) — the required permutation size.

Output

Print "-1" (without the quotes) if the lucky permutation p of size n doesn't exist.

Otherwise, print n distinct integers p1, p2, ..., pn (1 ≤ pi ≤ n) after a space — the required permutation.

If there are multiple answers, you can print any of them.

Examples

Input

1


Output

1 


Input

2


Output

-1


Input

4


Output

2 4 1 3 


Input

5


Output

2 5 3 1 4 
import java.util.*;
import java.math.*;
import java.io.*;

public class Main
    {
    public static void main(String args[]) throws IOException
        {
        InputReader in=new InputReader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        int N=in.readInt();
        int A[]=new int[N+1];
        Arrays.fill(A,-1);
        if(N%4!=0&&N%4!=1)
            {
            System.out.println("-1");
            return;
            }
        if(N==1)
            {
            System.out.println("1");
            return;
            }
        TreeSet<Integer> T=new TreeSet<Integer>();
        for(int i=1;i<=N;i++)
            T.add(i);
        if(N%4==1)
            {
            A[(N+1)/2]=(N+1)/2;
            T.remove((N+1)/2);
            }
        for(int i=1;i<=N;i++)
            {
            if(A[i]==-1)
                {
                int ai=T.pollFirst();
                if(ai==i)
                    {
                    int temp=T.pollFirst();
                    T.add(ai);
                    ai=temp;
                    }
                A[i]=ai;
                //System.out.println(i+" gets "+ai);
                A[ai]=N-i+1;
                //System.out.println(ai+" gets "+(N-i+1));
                A[N-i+1]=N-ai+1;
                //System.out.println((N-i+1)+" gets "+(N-ai+1));
                A[N-ai+1]=i;
                //System.out.println((N-ai+1)+" gets "+i);
                T.remove(ai);
                T.remove(N-i+1);
                T.remove(N-ai+1);
                T.remove(i);
                }
            }
        check(A);
        for(int i=1;i<=N;i++)
            out.print(A[i]+" ");
        out.println();
        out.close();
        }

    private static void check(int[] a)
        {
        int N=a.length-1;
        for(int i=1;i<=N;i++)
            {
            if(a[a[i]]!=N-i+1)
                {
                System.out.println((1/0));
                }
            }
        
        }
    }

class permGen
    {
    public int A[];

    public permGen(int a[])
        {
        A=new int[a.length];
        for(int i=0;i<a.length;i++)
            A[i]=a[i];
        }

    public int[] nextPerm()
        {
        //Find the largest index k such that a[k] < a[k + 1]. If no such index exists, the permutation is the last permutation.
        int N=A.length;
        int k=-1;
        for(int i=0;i<N-1;i++)
            {
            if(A[i]<A[i+1])
                k=i;
            }
        if(k==-1)
            return null;
        //Find the largest index l such that a[k] < a[l]. Since k + 1 is such an index, l is well defined and satisfies k < l
        int l=-1;
        for(int i=k+1;i<N;i++)
            {
            if(A[k]<A[i])
                l=i;
            }
        //Swap a[k] with a[l].
        swap(A,k,l);

        //Reverse the sequence from a[k + 1] up to and including the final element a[n]
        int i=k+1;
        int j=N-1;
        while (i<=j)
            {
            swap(A,i,j);
            i++;
            j--;
            }
        return A;
        }

    private void swap(int A[],int i,int j)
        {
        int t=A[i];
        A[i]=A[j];
        A[j]=t;
        }
    }
class InputReader
    {
    private InputStream stream;
    private byte[] buf=new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public InputReader(InputStream stream)
        {
        this.stream=stream;
        }

    public int read()
        {
        if(numChars==-1)
            throw new InputMismatchException();
        if(curChar>=numChars)
            {
            curChar=0;
            try
                {
                numChars=stream.read(buf);
                } catch (IOException e)
                {
                throw new InputMismatchException();
                }
            if(numChars<=0)
                return -1;
            }
        return buf[curChar++];
        }

    public int readInt()
        {
        int c=read();
        while (isSpaceChar(c))
            c=read();
        int sgn=1;
        if(c=='-')
            {
            sgn=-1;
            c=read();
            }
        int res=0;
        do
            {
            if(c<'0'||c>'9')
                throw new InputMismatchException();
            res*=10;
            res+=c-'0';
            c=read();
            } while (!isSpaceChar(c));
        return res*sgn;
        }

    public boolean isSpaceChar(int c)
        {
        if(filter!=null)
            return filter.isSpaceChar(c);
        return isWhitespace(c);
        }

    public static boolean isWhitespace(int c)
        {
        return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
        }

    public char readCharacter()
        {
        int c=read();
        while (isSpaceChar(c))
            c=read();
        return (char) c;
        }

    public interface SpaceCharFilter
        {
        public boolean isSpaceChar(int ch);
        }
    }
