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.io.*;
import java.util.*;
import java.math.*;
import java.awt.geom.*;

import static java.lang.Math.*;

public class Solution implements Runnable {
	
	int n;
	int p [];
	boolean used[];
	int count = 0;
	
	void doIt (int k) {
		if (count > 0) return;
		if (k == n + 1) {
			boolean good = true;
			for (int i = 1; i <= n; i++) {
				if (p[p[i]] != n - i + 1) {
					good = false;
				}
			}
			if (good) {
				count++;
				for (int i = 1; i <= n; i++) {
					out.print(p[i]+" ");
				}
				out.println();
			}
		} else {
			for (int i = 1; i <= n; i++) {
				if (!used[i]) {
					used[i] = true;
					p[k] = i;
					doIt (k + 1);
					used[i] = false;
				}
			}
		}
	}
	
	public void solve() throws Throwable {
		n = sc.nextInt();
		if (n == 1) {
			out.println(1);
			return;
		} else if (n <= 3) {
			out.println(-1);
			return;
		}
		p = new int [n + 1];
		used = new boolean [n + 1];
		if (n % 4 == 0 || (n - 1) % 4 == 0) {
			int l = 1;
			int r = n;
			while (l < r) {
				p[l] = l + 1;
				p[l + 1] = n - l + 1;
				p[r] = n - l;
				p[r - 1] = l;
				l += 2;
				r -= 2;
			}
			if (l == r) {
				p[l] = n / 2 + 1;
			}
		} else {
			out.println(-1);
			return;
		}
		
		for (int i = 1; i <= n; i++) {
			out.print((p[i])+" ");
		}
	}

	BufferedReader in;
	PrintWriter out;
	FastScanner sc;

	static Throwable uncaught;

	@Override
	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			sc = new FastScanner(in);
			solve();
		} catch (Throwable t) {
			Solution.uncaught = t;
		} finally {
			out.close();
		}
	}

	public static void main(String[] args) throws Throwable {
		Thread t = new Thread(null, new Solution(), "", (1 << 26));
		t.start();
		t.join();
		if (uncaught != null) {
			throw uncaught;
		}
	}

}

class FastScanner {

	BufferedReader reader;
	StringTokenizer strTok;

	public FastScanner(BufferedReader reader) {
		this.reader = reader;
	}

	public String nextToken() throws IOException {
		while (strTok == null || !strTok.hasMoreTokens()) {
			strTok = new StringTokenizer(reader.readLine().trim());
		}
		return strTok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

}