A permutation is a sequence of integers p_1, p_2, ..., p_{n}, consisting of n distinct positive integers, each of them doesn't exceed n. Let's denote the i-th element of permutation p as p_{i}. We'll call number n the size of permutation p_1, p_2, ..., p_{n}.

Nickolas adores permutations. He likes some permutations more than the others. He calls such permutations perfect. A perfect permutation is such permutation p that for any i (1 ≤ i ≤ n) (n is the permutation size) the following equations hold p_{p}_{i} = i and p_{i} ≠ i. Nickolas asks you to print any perfect permutation of size n for the given n.


-----Input-----

A single line contains a single integer n (1 ≤ n ≤ 100) — the permutation size.


-----Output-----

If a perfect permutation of size n doesn't exist, print a single integer -1. Otherwise print n distinct integers from 1 to n, p_1, p_2, ..., p_{n} — permutation p, that is perfect. Separate printed numbers by whitespaces.


-----Examples-----
Input
1

Output
-1

Input
2

Output
2 1 

Input
4

Output
2 1 4 3

Difficulty: EASY
Tags: Mathematics

Implementation

Starter code:

Solutions:
n = int(input())
l = []
if n % 2 == 1:
	p = -1
else:
	for x in range(1, n + 1):
		l.append(x)
	for x in range(0, x - 1, 2):
		k = l[x]
		l[x] = l[x + 1]
		l[x + 1] = k
		p = l
if p != -1:
	for x in p:
		print(x, end=' ')
else:
	print(p)


a = int(input())
if a % 2 != 0:
	print(-1)
else:
	for x in range(1, a + 1):
		if x % 2 == 0:
			print(x - 1, end=' ')
		else:
			print(x + 1, end=' ')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	if n % 2 == 1:
		return -1
	return ' '.join(map(lambda x: str(x + 1 if x % 2 else x - 1), range(1, n + 1)))
print(main())


n = int(input())
if n % 2 == 1:
	print(-1, end=' ')
else:
	for i in range(n, 0, -1):
		print(i, end=' ')


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	p = []
	for i in range(1, n + 1):
		p.append(i + 2 * (i % 2) - 1)
	print(*p)


n = int(input())
if n % 2 == 1:
	print('-1')
else:
	result = []
	for i in range(n):
		if i % 2 == 0:
			result.append(i + 2)
		else:
			result.append(i)
	print(*result, sep=' ')


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	res = [i for i in range(1, n + 1)]
	for i in range(0, len(res) - 1, 2):
		(res[i], res[i + 1]) = (res[i + 1], res[i])
	print(' '.join((str(x) for x in res)))


r = int(input())
if r % 2:
	print(-1)
else:
	print(' '.join((str(2 + x) if not x % 2 else str(x) for x in range(r))))


def answer():
	a = int(input())
	if a % 2:
		print(-1)
	else:
		i = a
		ans = ''
		while i > 0:
			ans += str(i)
			if i != 1:
				ans += ' '
			i -= 1
		print(ans)
answer()


n = int(input())
if n % 2:
	print(-1)
else:
	arr = list(range(1, n + 1))
	for i in range(0, n, 2):
		(arr[i], arr[i + 1]) = (arr[i + 1], arr[i])
	print(*arr)


n = int(input())
if n % 2 != 0:
	print('-1')
else:
	i = 1
	while i < n + 1:
		print(i + 1, i, sep=' ', end='')
		print(' ', end='')
		i += 2


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	a = []
	for i in range(n):
		if i % 2 == 0:
			a.append(i + 2)
		else:
			a.append(i)
	for k in a:
		print(k, end=' ')


n = int(input())
permu = list()
if n % 2 == 1:
	print('-1')
else:
	for idx in range(1, n // 2 + 1):
		permu.append(2 * idx)
		permu.append(2 * idx - 1)
	print(' '.join(map(str, permu)))


import sys
import math
import bisect

def main():
	n = int(input())
	if n % 2 == 1:
		print(-1)
	else:
		A = [0] * n
		for i in range(n):
			A[i] = i + 1
		for i in range(0, n, 2):
			(A[i], A[i + 1]) = (A[i + 1], A[i])
		print(' '.join(list((str(a) for a in A))))
main()


n = int(input())
l = []
for i in range(1, n + 1):
	l.append(i)
if n % 2 != 0:
	print(-1)
else:
	l.reverse()
	print(*l)


def calc(a):
	perm = [-1 for x in range(a)]
	for c in range(1, a + 1):
		for i in range(len(perm)):
			if i + 1 != c and perm[i] == -1:
				perm[i] = c
				break
	for e in perm:
		if e == -1:
			return [-1]
	return perm
a = int(input())
print(' '.join([str(x) for x in calc(a)]))


n = int(input())
l = []
(a, b) = (0, 0)
m = n // 2 + 1
if n % 2 != 0:
	print(-1)
else:
	for i in range(1, m):
		a = 2 * i
		l.append(a)
		b = 2 * i - 1
		l.append(b)
print(*l)


n = int(input())
if n % 2 == 1:
	print('-1')
	exit(0)
for i in range(1, n + 1, 2):
	print(str(i + 1) + ' ' + str(i), end=' ')


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	output = []
	for i in range(1, n + 1):
		output.append(i)
	for i in range(0, n, 2):
		(output[i], output[i + 1]) = (output[i + 1], output[i])
	for i in range(len(output)):
		print(output[i], end=' ')


n = int(input())
if n % 2 == 1:
	print('-1')
else:
	for i in range(n // 2):
		x = 2 * (i + 1)
		y = x - 1
		print(x, end=' ')
		print(y, end=' ')


n = int(input())
lst = []
valid = True
if n % 2 == 0:
	for i in range(0, n, 2):
		lst.append(i + 2)
		lst.append(i + 1)
else:
	valid = False
if valid:
	print(' '.join(map(str, lst)))
else:
	print(-1)


n = int(input())
l = []
if n % 2 == 0:
	for i in range(1, n + 1):
		l.append(str(i))
	for i in range(0, n - 1, 2):
		a = l[i]
		l[i] = l[i + 1]
		l[i + 1] = a
	print(' '.join(l))
else:
	print('-1')


n = int(input())
x = []
if n % 2 == 1:
	print(-1)
else:
	for i in range(1, n + 1):
		x.append(i)
	for i in range(0, n - 1, 2):
		(x[i], x[i + 1]) = (x[i + 1], x[i])
print(*x)


n = int(input())
if n & 1:
	print(-1)
else:
	r = []
	for i in range(2, n + 1, 2):
		r.extend([i, i - 1])
	print(*r)


def per(n):
	if n % 2 == 1:
		print(-1)
	else:
		for i in range(1, n // 2 + 1):
			print(2 * i, 2 * i - 1, end=' ')
z = int(input())
per(z)


n = int(input())
l = []
if n % 2 != 0:
	print(-1)
else:
	l = list(range(n, 0, -1))
for x in l:
	print(x, end=' ')


n = int(input())
l = [i for i in range(1, n + 1)]
if len(l) % 2 == 1:
	print(-1)
else:
	for j in range(len(l) - 1):
		if l[j] == j + 1:
			(l[j + 1], l[j]) = (l[j], l[j + 1])
	print(' '.join(map(str, l)))


R = lambda : map(int, input().split())
n = int(input())
if n % 2:
	print(-1)
else:
	for i in range(1, n + 1, 2):
		print(i + 1, i, end=' ')


n = int(input())
if n <= 1 or n % 2 != 0:
	print('-1')
else:
	l = [x + 1 for x in range(n)]
	i = 0
	if n % 2 == 0:
		while i < len(l):
			(l[i], l[i + 1]) = (l[i + 1], l[i])
			i = i + 2
	print(*l, sep=' ')


n = int(input())
if n % 2:
	print(-1)
else:
	output = '2 1'
	for i in range(3, n):
		if i % 2:
			output += ' ' + str(i + 1) + ' ' + str(i)
	print(output)


n = int(input())
if n % 2 != 0:
	print(-1)
	exit()
else:
	l = []
	for i in range(1, n + 1):
		if i % 2 == 0:
			l.append(i - 1)
		else:
			l.append(i + 1)
print(*l, sep=' ')


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def solve():
	n = int(inp())
	if n % 2 == 1:
		print(-1)
	else:
		for i in range(n, 0, -1):
			print(i, end=' ')
solve()


a = int(input())
l = []
if a % 2 != 0:
	print(-1)
else:
	for i in range(a):
		if i % 2 == 0:
			l.append(i + 2)
		else:
			l.append(i)
	print(*l)


n = int(input())
x = []
if n % 2 == 0:
	for i in range(1, n + 1):
		x.append(i + 1 if i % 2 else i - 1)
else:
	x = [-1]
print(' '.join(map(str, x)))


import sys
import math
n = int(input())
ata = [int(x) for x in range(1, n + 1)]
if n % 2 != 0:
	print('-1')
else:
	for i in range(0, len(ata), 2):
		(ata[i], ata[i + 1]) = (ata[i + 1], ata[i])
	for i in range(len(ata)):
		print(ata[i], end=' ')


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	i = 1
	while True:
		print(i + 1, i, end=' ')
		if i + 1 == n:
			break
		else:
			i += 2


a = int(input())
if a % 2 != 0:
	print(-1)
else:
	t = []
	for j in range(2, a + 1, 2):
		t.append(j)
		t.append(j - 1)
	print(*t)


n = int(input())
a = []
if n % 2 != 0:
	print(-1)
else:
	e = 2
	o = 1
	for i in range(1, n + 1):
		if i % 2 != 0:
			a.append(e)
			e += 2
		else:
			a.append(o)
			o += 2
	print(*a)


n = int(input())
list1 = []
if n % 2 == 1:
	print('-1')
if n % 2 != 1:
	i = 1
	while i <= n:
		list1.append(i + 1)
		list1.append(i)
		i = i + 2
for i in list1:
	print(i, end=' ')


n = int(input())
if n % 2:
	print(-1)
else:
	print(*range(n, 0, -1))


n = int(input())
arr = []
if n & 1:
	print(-1)
else:
	for i in range(1, n + 1):
		if i & 1:
			val = i + 1
		else:
			val = i - 1
		arr.append(val)
	print(*arr)


a = int(input())
if a % 2 != 0:
	print(-1)
else:
	b = []
	x = int(1)
	while x < a:
		b.append(x + 1)
		b.append(x)
		x = x + 2
	print(*b)


n = int(input())
z = []
if n % 2 == 1:
	print(-1)
else:
	for i in range(1, n + 1):
		z.append(i)
	j = 0
	while j < n:
		if z[j] == j + 1:
			temp = z[j]
			z[j] = z[j + 1]
			z[j + 1] = temp
		j += 2
	print(*z, sep=' ')


n = int(input())
if n % 2 == 0:
	X = '2 1 '
	for i in range(n, 2, -2):
		X += '{} {} '.format(i, i - 1)
	print(X)
else:
	print(-1)


import sys
import os.path
import math
import heapq
from sys import stdin, stdout
from collections import *
from math import gcd, ceil, floor
mod = int(1000000000.0 + 7)
if os.path.exists('Updated prg/Input3d.txt'):
	sys.stdout = open('Updated prg/Output3d.txt', 'w')
	sys.stdin = open('Updated prg/Input3d.txt', 'r')

def sinp():
	return input()

def ninp():
	return int(sinp())

def mapinp():
	return map(int, sinp().split())

def linp():
	return list(mapinp())

def sl():
	return list(sinp())

def prnt(a):
	print(a)
n = ninp()
l1 = [i for i in range(1, n + 1)]
if n % 2 != 0:
	prnt(-1)
else:
	for i in range(0, n - 1, 2):
		(l1[i], l1[i + 1]) = (l1[i + 1], l1[i])
	for i in l1:
		print(i, end=' ')


n = int(input())
l = []
if n % 2 == 0:
	for i in range(1, n + 1):
		l.append(i)
	for i in range(0, len(l) - 1, 2):
		t = l[i]
		l[i] = l[i + 1]
		l[i + 1] = t
	for i in l:
		print(i, end=' ')
else:
	print(-1)


from sys import stdin
n = int(stdin.readline())
nums = [0] * n
if n % 2 == 1:
	print(-1)
	exit()
cur = 1
for i in range(1, n, 2):
	nums[i] = cur
	cur += 2
cur = 2
for i in range(0, n, 2):
	nums[i] = cur
	cur += 2
for num in nums:
	print(str(num) + ' ', end='')


from fileinput import *
for line in input():
	if lineno() == 1:
		n = int(line.strip())
if n % 2 == 0:
	li = [i + 1 for i in range(n)]
	(li[::2], li[1::2]) = (li[1::2], li[::2])
	print(''.join([str(num) + ' ' for num in li]))
else:
	print('-1')


n = int(input())
l = list()
if n % 2 == 1:
	print(-1)
elif n % 2 == 0:
	for i in range(n, 0, -1):
		print(i, end=' ')


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	s = [i + 1 for i in range(n)]
	for i in range(0, len(s) - 1, 2):
		(s[i], s[i + 1]) = (s[i + 1], s[i])
	print(' '.join((str(s1) for s1 in s)))


n = int(input())
S = []
if n % 2 == 0:
	t = 2
	for i in range(n // 2):
		S.append(str(t))
		t = t - 1
		S.append(str(t))
		t = t + 3
	print(' '.join(S))
else:
	print(-1)


n = int(input())
if n & 1:
	print(-1)
else:
	i = 1
	l = []
	while i < n + 1:
		if i & 1:
			l.append(i + 1)
		else:
			l.append(i - 1)
		i += 1
	print(*l)


import sys
try:
	sys.stdin = open('inputs.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
finally:
	input = sys.stdin.readline
	print = sys.stdout.write
n = int(input())
if n & 1:
	print(str(-1))
else:
	out = [str(i + 1) if i & 1 else str(i - 1) for i in range(1, n + 1)]
	print(' '.join(out))


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	arr = []
	for i in range(1, n + 1, 2):
		arr.append(i + 1)
		arr.append(i)
	print(' '.join(map(str, arr)))


def main():
	n = int(input())
	if n % 2:
		print(-1)
		return
	print(' '.join(map(str, [x + 1 if x % 2 else x - 1 for x in range(1, n + 1)])))
main()


n = int(input())
k = list(range(1, n + 1))
if n % 2 == 0:
	k = k[::-1]
	k = map(str, k)
	print(' '.join(k))
else:
	print(-1)


from math import sqrt

def main():
	n = int(input())
	res = []
	if n % 2 == 1:
		print(-1)
	else:
		for i in range(1, n + 1):
			res.append(i + 1 if i % 2 != 0 else i - 1)
		print(' '.join([str(r) for r in res]))
main()


def swap(arr, i, j):
	(arr[i], arr[j]) = (arr[j], arr[i])
n = int(input())
ll = []
for i in range(1, n + 1):
	ll.append(i)
i = 0
j = 1
a = [k for k in ll]
while i < n - 1 and j < n:
	swap(ll, i, j)
	i += 2
	j += 2
flag = 1
for i in range(n):
	if i + 1 == ll[i]:
		flag = 0
		break
if flag == 1:
	print(*ll)
else:
	print(-1)


size = int(input())
if size % 2 == 1:
	print(-1)
else:
	i = 0
	while i < size:
		print(i + 2, i + 1, end=' ')
		i += 2


given = [x for x in range(1, int(input()) + 1)]
lens = len(given)
if lens % 2 == 1:
	print(-1)
else:
	answer = []
	lens = len(given)
	i = 1
	while i < lens:
		answer.extend([i + 1, i])
		i += 2
	print(*answer)


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	out = [0] * n
	t = True
	for i in range(n):
		if t:
			out[i + 1] = i + 1
			t = False
		else:
			out[i - 1] = i + 1
			t = True
	for i in range(n):
		print(out[i], end=' ')


n = int(input())
if n % 2 == 1:
	print(-1)
	exit()
ans = list(range(1, n + 1))
for i in range(0, n, 2):
	(ans[i], ans[i + 1]) = (ans[i + 1], ans[i])
print(' '.join(map(str, ans)))


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	even = [str(i) for i in range(2, n + 1, 2)]
	odd = [str(i) for i in range(1, n, 2)]
	for i in range(0, n // 2):
		print(even[i] + ' ' + odd[i], end=' ')


a = int(input())
if a % 2 == 1:
	print(-1)
else:
	for i in range(a):
		print(a - i, end=' ')


num = int(input())
if num % 2 == 1:
	print('-1')
else:
	s = '2 1'
	for i in range(3, num, 2):
		s += ' ' + str(i + 1) + ' ' + str(i)
	print(s)


n = int(input())
U = []
a = ''
if n % 2:
	print(-1)
else:
	for i in range(1, n + 1, 2):
		U.append(i + 1)
		U.append(i)
for j in U:
	a += str(j) + ' '
print(a)


A = list(range(int(input())))
if len(A) % 2:
	print(-1)
else:
	print(' '.join(map(lambda x: str((x ^ 1) + 1), A)))


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	i = 1
	while i < n:
		print(i + 1, i, end=' ')
		i += 2


n = int(input())
ans = []
if n % 2 == 1:
	print(-1)
else:
	ans.append(2)
	ans.append(1)
	for i in range(3, n, 2):
		ans.append(i + 1)
		ans.append(i)
	print(*ans, sep=' ')


a = int(input())
x = a
if a % 2 != 0:
	print('-1')
elif a % 2 == 0:
	for i in range(a):
		a = x - i
		print(a)


n = int(input())
if n == 1 or n % 2 == 1:
	print(-1)
else:
	for _ in range(1, n, 2):
		print(_ + 1, _, end=' ')


n = int(input())
lis = []
x = 2
flag = 1
if n % 2 == 1:
	print('-1')
else:
	lis.append(x)
	for i in range(n - 1):
		if flag == 1:
			x -= 1
			flag = 0
			lis.append(x)
		else:
			x += 3
			flag = 1
			lis.append(x)
	print(*lis)


import sys
import math
import collections
from collections import deque
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
n = int(stdin.readline().strip('\n'))
if n % 2 == 0:
	for i in range(1, n // 2 + 1):
		print(2 * i, 2 * i - 1, end=' ')
else:
	print(-1)


a = int(input())
if a % 2 != 0:
	print('-1')
else:
	c = 0
	while c != a:
		c += 2
		print(c, c - 1, end=' ')


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	p = [i + 1 if i % 2 == 1 else i - 1 for i in range(1, n + 1)]
	print(' '.join([str(p2) for p2 in p]))


n = int(input())
j = 1
k = 2
if n % 2 != 0:
	print(-1)
else:
	while j <= n:
		print(k, end=' ')
		print(j, end=' ')
		k = k + 2
		j = j + 2


x = int(input())
lis = []
for i in range(1, x + 1):
	lis.append(i)
if len(lis) % 2 == 1:
	print(-1)
else:
	i = 0
	while i < len(lis) - 1:
		temp = lis[i]
		lis[i] = lis[i + 1]
		lis[i + 1] = temp
		i += 2
	for i in lis:
		print(i, end=' ')


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	l = []
	i = 1
	j = 2
	c = 0
	f = 0
	while c < n:
		if f == 0:
			l.append(j)
			j += 2
			f = 1
		elif f == 1:
			l.append(i)
			i += 2
			f = 0
		c += 1
	print(*l)


n = int(input())
if n % 2 == 1:
	print('-1')
else:
	line = list()
	for i in range(1, n // 2 + 1):
		line.append(str(2 * i))
		line.append(str(2 * i - 1))
	print(' '.join(line))


n = int(input())
if n < 2 or n % 2 == 1:
	print(-1)
else:
	a = list(range(1, n + 1))
	for i in range(len(a) - 1):
		if i % 2 == 0:
			(a[i], a[i + 1]) = (a[i + 1], a[i])
	for x in a:
		print(x, end=' ')


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	arr = [i + 1 for i in range(n)]
	for i in range(0, n, 2):
		buff = arr[i]
		arr[i] = arr[i + 1]
		arr[i + 1] = buff
	print(' '.join([str(elem) for elem in arr]))


n = int(input())
z = [i + 1 for i in range(n)]
if n % 2 != 0:
	print(-1)
else:
	i = 0
	j = 1
	k = [0] * n
	while j < n:
		(k[i], k[j]) = (z[j], z[i])
		i = i + 2
		j = j + 2
	print(*k)


a = int(input())
if a % 2 == 1:
	print('-1')
else:
	k = 1
	while k < a:
		print(k + 1, end=' ')
		print(k, end=' ')
		k += 2


import sys, math
input = sys.stdin.readline

def inp():
	return int(input())

def inara():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
if n % 2:
	print(-1)
else:
	for i in range(1, n + 1):
		if i % 2:
			print(str(i + 1), end=' ')
		else:
			print(str(i - 1), end=' ')


n = int(input(''))
i = n
if i % 2 == 1:
	print('-1')
else:
	s = ''
	for i in range(0, n, 2):
		s += str(i + 2) + ' '
		s += str(i + 1) + ' '
	print(s[:-1])


n = int(input())
i = 1
if n % 2 == 1:
	print(-1)
else:
	while i < n:
		j = 2
		while 1 <= j < 3:
			print(i + j - 1, ' ', end='')
			j -= 1
		i += 2


n = int(input())
if n % 2 == 1:
	print('-1')
else:
	result = [0] * n
	for i in range(n):
		if i % 2 == 1:
			result[i] = i
		else:
			result[i] = i + 2
	print(' '.join(list(map(str, result))))


line = input()
if int(line) % 2 != 0:
	print('-1')
else:
	number_list = []
	for i in range(1, int(line) + 1):
		number_list.append(str(i))
	endlist = []
	for k in range(0, len(number_list), 2):
		endlist.append(number_list[k + 1])
		endlist.append(number_list[k])
	print(' '.join(endlist))


n = int(input())
ls = []
if n & 1:
	print(-1)
else:
	for i in range(2, n + 1, 2):
		ls += [i, i - 1]
print(*ls)


N = int(input())
if N <= 1 or N % 2 != 0:
	print('-1')
	exit
else:
	permute = [0] * N
	for i in range(1, N + 1):
		if i % 2 == 0:
			permute[i - 1] = i - 1
			continue
		permute[i - 1] = i + 1
	print(' '.join(map(str, permute)))


import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def is_isprime(n):
	if n == 0 or n == 1:
		return False
	if n == 2:
		return True
	limit = int(sqrt(n) + 1)
	for i in range(2, limit + 1):
		if n % i == 0:
			return False
	return True
n = inp()
if n % 2 != 0:
	print(-1)
else:
	res = [0] * (n + 1)
	for i in range(1, n + 1):
		res[i] = i
		if i % 2 == 0:
			(res[i], res[i - 1]) = (res[i - 1], res[i])
	print(*res[1:])


a = int(input())
if a % 2 == 1:
	print('-1')
else:
	s = 1
	while s <= a:
		print(s + 1, s, end=' ')
		s += 2


n = int(input())
if n & 1:
	print(-1)
	exit()
else:
	a = list(range(1, n + 1))
	for i in range(0, n, 2):
		(a[i], a[i + 1]) = (a[i + 1], a[i])
	print(*a)


while True:
	try:

		class Permutation:

			def __init__(self):
				self.p = []
				self.n = 0

			def inputt(self):
				self.n = int(input())

			def solve(self):
				if self.n % 2 == 1:
					print(-1)
				else:
					yn = False
					for i in range(self.n):
						if yn:
							self.p.append(i)
							yn = False
						else:
							self.p.append(i + 2)
							yn = True
					print(*self.p)
		if __name__ == '__main__':
			c1 = Permutation()
			c1.inputt()
			c1.solve()
	except EOFError:
		break


import sys
input = sys.stdin.readline
ins = lambda : input().rstrip()
ini = lambda : int(input().rstrip())
inm = lambda : map(int, input().rstrip().split())
inl = lambda : list(map(int, input().split()))
out = lambda x, s='\n': print(s.join(map(str, x)))
n = ini()
if n % 2:
	print(-1)
else:
	ans = []
	for i in range(1, n + 1, 2):
		ans.append(i + 1)
		ans.append(i)
	print(*ans)


import sys
N = int(sys.stdin.readline())
num_list = []
if N % 2 != 0:
	print(-1)
elif N == 2:
	print('%s %s' % (2, 1))
else:
	cnt = N // 2
	base = 2
	for i in range(cnt):
		num_list.append(base)
		num_list.append(base - 1)
		base += 2
	print(' '.join([str(x) for x in num_list]))


n = int(input())
mylist = []
if n % 2 != 0:
	print(-1)
else:
	for i in range(n):
		if i % 2 == 0:
			mylist.append(i + 2)
		else:
			mylist.append(i)
	for j in range(n):
		print(mylist[j], end=' ')


n = int(input())
if n & 1:
	print('-1')
else:
	stuff = []
	stuff = [i for i in range(1, n + 1)]
	stuff.reverse()
	for j in range(0, n):
		print(stuff[j], end=' ')


n = int(input())
if n == 1:
	print(-1)
else:
	a = [i for i in range(1, n + 1)]
	a.reverse()
	if n % 2 == 0:
		print(*a)
	else:
		print(-1)


z = input
n = int(z())
if n % 2 == 1 or n == 3:
	print(-1)
	exit()
else:
	l = []
	for i in range(n, 0, -1):
		l.append(i)
	print(*l)


def main():
	n = int(input())
	if n & 1:
		print(-1)
		return
	i = n
	while i > 0:
		print(i, end=' ')
		i -= 1
main()


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	j = 1
	while j <= n:
		print(j + 1, j, end=' ')
		j += 2


3

def readln():
	return tuple(map(int, input().split()))
(n,) = readln()
if n % 2:
	print(-1)
else:
	for i in range(0, n, 2):
		print(i + 2, i + 1, end=' ')
	print()


N = int(input())
if N % 2 == 1:
	print(-1)
else:
	for i in [[x + 1, x] for x in range(1, N + 1, 2)]:
		print(*i, end=' ')


n = int(input())
P = list(range(n + 1)[1:])
if n % 2 != 0:
	print(-1)
else:
	for (i, v) in enumerate(P):
		V = v - 1
		if i == V:
			(P[i + 1], P[i]) = (P[i], P[i + 1])
	print(*P)


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	l = list()
	for i in range(1, n + 1):
		l.append(i)
	for i in range(0, n - 1, 2):
		temp = l[i]
		l[i] = l[i + 1]
		l[i + 1] = temp
	print(*l)


n = int(input())
if n % 2 == 1:
	print('-1')
else:
	arr = [0] * n
	i = 0
	while i < n // 2:
		arr[i] = n - i
		arr[n - i - 1] = i + 1
		i += 1
	for x in range(0, n):
		print(arr[x], end=' ')


n = int(input())
l = []
if n % 2 == 1:
	print(-1)
	exit()
i = 1
while i < n + 1:
	l.append(i + 1)
	l.append(i)
	i += 2
print(*l)


n = int(input())
if n % 2 != 0:
	print('-1')
	exit(0)
output = [None] * n
for i in range(0, n, 2):
	output[i] = i + 2
	output[i + 1] = i + 1
print(' '.join(map(str, output)))


loop = int(input())
if loop % 2 > 0:
	print(-1)
else:
	answer = ''
	for i in range(1, loop + 1, 2):
		answer += str(i + 1)
		answer += ' '
		answer += str(i)
		answer += ' '
	print(answer)


n = int(input())
if n == 1:
	print('-1')
elif n % 2 == 1:
	print('-1')
else:
	p = []
	for i in range(0, n - 1, 2):
		p.append(i + 2)
		p.append(i + 1)
	out = ''
	for i in p:
		out += str(i) + ' '
	print(out[0:-1])


n = int(input())
elements = [x for x in range(1, n + 1)]
if n % 2 == 0:
	for i in range(0, n, 2):
		(elements[i], elements[i + 1]) = (elements[i + 1], elements[i])
	elements = [str(x) for x in elements]
	print(' '.join(elements))
else:
	print(-1)


def ppp(n):
	l = []
	d = 1
	while d < n:
		l.append(d + 1)
		l.append(d)
		d = d + 2
	return l
n = int(input())
if n % 2 != 0:
	print(-1)
else:
	t = ppp(n)
	print(*t)


from sys import stdin
n = int(stdin.readline())
if n % 2 == 1:
	print(-1)
else:
	for i in range(n):
		print(n - i, end=' ')


n = int(input())
s = ''
if n < 2 or n % 2 == 1:
	print(-1)
else:
	l = [*range(n, 0, -1)]
	for x in l:
		s += str(x) + ' '
	print(s)


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	a = [0] * n
	for _ in range(1, n + 1):
		if _ % 2 == 1:
			a[_] = _
		else:
			a[_ - 2] = _
	for val in a:
		print(val, end=' ')


x = int(input())
z = []
swap = 0
if x % 2 == 1:
	print(-1)
else:
	for i in range(1, x + 1):
		z.append(i)
	for i in range(1, x, 2):
		swap = z[i - 1]
		z[i - 1] = z[i]
		z[i] = swap
	for i in range(len(z)):
		print(z[i], end=' ')


n = int(input(''))
l = []
if n % 2 != 0:
	print(-1)
	exit()
else:
	for i in range(1, n):
		x = 2 * i
		y = 2 * i - 1
		l.append(x)
		l.append(y)
print(*l[0:n])


t = int(input())
sum = ''
if t % 2 == 1:
	print(-1)
else:
	i = 2
	while i <= t:
		sum += str(i)
		sum += ' '
		if i % 2 == 0:
			i -= 1
		else:
			i += 3
	print(sum)


def main():
	n = int(input())
	if n % 2 != 0:
		print(-1)
	else:
		results = [''] * (n + 1)
		for i in range(1, n + 1):
			results[i] = str(i + 1) if i % 2 != 0 else str(i - 1)
		print(' '.join(results[1:]))
main()


n = int(input())
if n % 2 == 0:
	lst = list((str(x) for x in range(1, n + 1)))
	i = 0
	while i <= n - 2:
		(lst[i], lst[i + 1]) = (lst[i + 1], lst[i])
		i += 2
	print(' '.join(lst))
else:
	print(-1)


import sys
n = int(input())
if n % 2 == 1:
	print(-1)
	sys.exit()
for i in range(1, n + 1, 2):
	print(i + 1)
	print(i)
sys.exit()


A = int(input())
ans = []
if A % 2 == 1:
	print(-1)
else:
	for i in range(A, 0, -1):
		ans.append(i)
	print(*ans)


n = int(input())
l = [0] * n
if n % 2 != 0:
	print(-1)
else:
	for i in range(0, n - 1, 2):
		l[i] = i + 2
		l[i + 1] = i + 1
	s = ' '.join([str(elem) for elem in l])
	print(s)


a = int(input())
if a % 2 == 0:
	u = 1
	while a >= u:
		print(a)
		a -= 1
else:
	print(-1)


def intervals():
	while True:
		yield 3
		yield (-1)
x = -1

def perm_stream():
	global x
	for i in intervals():
		x += i
		yield x
L = int(input(''))
stream = perm_stream()
print(' '.join((str(next(stream)) for _ in range(L))) if L & 1 == 0 else '-1')


a = int(input())
b = ''
if a % 2 == 0:
	for i in range(1, a + 1, 2):
		b = b + str(i + 1) + ' ' + str(i) + ' '
	print(b)
else:
	print(-1)


def swap(s):
	s = list(s)
	for c in range(0, len(s), 2):
		t = s[c]
		s[c] = s[c + 1]
		s[c + 1] = t
	return s
n = int(input())
li = []
for i in range(1, n + 1):
	if n % 2 != 0:
		print(-1)
		break
	else:
		li.append(i)
new = swap(li)
print(' '.join(map(str, new)))


n = int(input())
l = [int(i) for i in range(2, n + 1) if i % 2 == 0]
p = [int(i) for i in range(1, n + 1) if i % 2 != 0]
o = []
for i in range(n // 2):
	o.append(l[i])
	o.append(p[i])
if n % 2 != 0:
	print('-1')
else:
	for i in o:
		print(i, end=' ')


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	while n != 0:
		print(n, end=' ')
		n -= 1


n = int(input())
print(' '.join(['-1'] if n % 2 else [str(x) for x in list(reversed(range(1, n + 1)))]))


a = int(input())
if a % 2 == 1:
	print(-1)
else:
	l = list(range(1, a + 1))
	for i in range(0, a - 1, 2):
		(l[i], l[i + 1]) = (l[i + 1], l[i])
	for i in range(a):
		print(l[i], end=' ')


a = list(range(2, 101, 2))
b = list(range(1, 100, 2))
c = []
for (i, j) in zip(a, b):
	c.append(i)
	c.append(j)
n = int(input())
if n % 2 != 0:
	print(-1)
else:
	print(*c[:n])


n = int(input().strip())
if n % 2 != 0:
	print('-1')
else:
	arr = [int(i) for i in range(1, n + 1)]
	for i in range(0, len(arr), 2):
		(arr[i], arr[i + 1]) = (arr[i + 1], arr[i])
	arr1 = [str(i) for i in arr]
	print(' '.join(arr1))


from sys import stdin, stdout

def main():
	n = int(stdin.readline())
	if n % 2 != 0:
		stdout.write(str(-1))
	else:
		arr = []
		for i in range(1, int(n / 2) + 1):
			arr.append(2 * i)
			arr.append(2 * i - 1)
		for x in arr:
			stdout.write(str(x) + ' ')
main()


n = int(input())
li = []
l = []
j = 0
if n % 2 == 1:
	print(-1)
else:
	for i in range(1, n + 1):
		li.append(i)
		j += 1
	for i in range(0, n, 2):
		l.insert(i, li[i + 1])
		l.insert(i + 1, li[i])
for i in range(len(l)):
	print(l[i], end=' ')


n = int(input())
lst = list(range(1, n + 1))
i = 0
if n % 2 == 0:
	while i < len(lst) - 1:
		temp = str(lst[i])
		lst[i] = str(lst[i + 1])
		lst[i + 1] = temp
		i += 2
	print(' '.join(lst))
else:
	print('-1')


from sys import stdin, stdout
input = stdin.readline
n = int(input())
if n % 2 == 1:
	ans = '-1'
else:
	ans = ''
	for i in range(n, 0, -1):
		ans += str(i) + ' '
	ans = ans[:-1]
stdout.write(ans)


n = int(input())
arr = [i for i in range(1, n + 1)]
if len(arr) % 2 != 0:
	print(-1)
else:
	for i in range(0, n, 2):
		(arr[i], arr[i + 1]) = (arr[i + 1], arr[i])
	s = ''
	for x in arr:
		s += str(x) + ' '
	print(s)


x = int(input())
if x % 2 == 1:
	print(-1)
	quit()
a = []
a.append(2)
a.append(1)
for i in range(3, x, 2):
	a.append(i + 1)
	a.append(i)
for i in a:
	print(i, end=' ')


import math
n = int(input())
if n == 1:
	print(-1)
else:
	p = []
	for i in range(1, n + 1):
		p.append(i)
	k = math.ceil(n / 2)
	arr1 = p[:k]
	arr2 = p[k:]
	lar = [0]
	for i in arr2:
		lar.append(i)
	for i in arr1:
		lar.append(i)
	flag = 0
	for i in range(1, n):
		if lar[lar[i]] != i:
			flag = 1
	if flag == 1:
		print(-1)
	else:
		for i in range(1, n + 1):
			print(lar[i], end=' ')


n = int(input())
g = ''
if n % 2 != 0:
	print('-1')
else:
	a = [i for i in range(n, 0, -1)]
	for i in a:
		g += str(i) + ' '
print(g)


n = int(input())
l = [i for i in range(1, n + 1)]
if n % 2 == 0:
	t = 1
	while t < n:
		(l[t - 1], l[t]) = (l[t], l[t - 1])
		t += 2
	for i in l:
		print(i, end=' ')
else:
	print('-1')


n = int(input())
if n % 2 != 0:
	print('-1')
	exit()
x = [i + 1 for i in range(n)]
for i in range(0, n, 2):
	zzz = reversed(x[i:i + 2])
	zz = ' '.join(map(str, zzz))
	print(zz, end=' ')


class Code:

	def __init__(self):
		self.n = int(input())

	def process(self):
		if self.n % 2 == 1:
			print(-1)
		else:
			for i in range(1, self.n, 2):
				print(i + 1, i, end=' ')
code = Code()
code.process()


n = int(input())
if n % 2 == 0:
	l = [i for i in range(1, n + 1)]
	j = 0
	while j < n:
		temp = l[j]
		l[j] = l[j + 1]
		l[j + 1] = temp
		j = j + 2
	print(*l)
else:
	print(-1)


n = int(input())
seq = ''
if n == 1 or n % 2 != 0:
	print('-1')
else:
	for i in range(1, n + 1):
		if i % 2 != 0:
			seq += str(i + 1) + ' '
		else:
			seq += str(i - 1) + ' '
print(seq[:-1])


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	arr = []
	for i in range(1, n + 1):
		if i not in arr:
			arr.append(i + 1)
		else:
			arr.append(i - 1)
	print(*arr)


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	S = '2 1'
	i = 3
	while i < n:
		S = S + ' ' + str(i + 1) + ' ' + str(i)
		i = i + 2
	print(S)


n = int(input())
i = 1
if n % 2 != 0:
	print(-1)
else:
	l = []
	while n > 0:
		n -= 1
		if i % 2 != 0:
			l.append(str(i + 1))
		else:
			l.append(str(i - 1))
		i += 1
	print(' '.join(l))


def permutation(num):
	if num % 2 != 0:
		print(-1)
	else:
		for i in range(1, num // 2 + 1):
			a = 2 * i
			b = 2 * i - 1
			print('{} {}'.format(a, b), end=' ')
num = int(input())
permutation(num)


from sys import stdin, stdout
from math import gcd, sqrt, floor, ceil
import random
input = stdin.readline

def list_inp(x):
	return list(map(x, input().split()))

def map_inp(x):
	return map(x, input().split())

def lcm(a, b):
	return a * b // gcd(a, b)
n = int(input())
if n % 2:
	print(-1)
else:
	for i in range(n, 0, -1):
		print(i, end=' ')


n = int(input())
if n % 2 == 1:
	print(-1)
	exit(0)
res = []
for i in range(1, n + 1):
	res.append(i)
for i in range(0, n - 1, 2):
	a = res[i]
	res[i] = res[i + 1]
	res[i + 1] = a
print(' '.join(map(str, res)))


n = int(input())
v = [0 for i in range(n)]
if n % 2 == 1:
	print(-1)
	exit()
for i in range(n // 2):
	v[i * 2] = i * 2 + 2
	v[i * 2 + 1] = i * 2 + 1
print(' '.join(map(str, v)))


n_A = input()
n_A = int(n_A)
if n_A % 2 == 0:
	n_A = n_A // 2
	p = 2
	q = 1
	for i in range(1, n_A + 1):
		(print(p, end=' '),)
		print(q, end=' ')
		p = p + 2
		q = q + 2
else:
	print(-1)


n = int(input())
if n % 2 == 1:
	print(-1)
	exit()
a = []
for i in range(1, n + 1):
	a.append(i)
for i in range(0, n, 2):
	(a[i], a[i + 1]) = (a[i + 1], a[i])
print(*a)


n = int(input())
if n & 1:
	print(-1)
else:
	k = 2
	s = [0] * n
	for i in range(n):
		if not i & 1:
			s[i] = k
			k -= 1
		else:
			s[i] = k
			k += 3
	print(*s)


import sys
n = int(sys.stdin.readline())
if n % 2 != 0:
	sys.stdout.write('-1')
else:
	output = list(range(1, n + 1))
	for i in range(n // 2):
		(output[2 * i], output[2 * i + 1]) = (output[2 * i + 1], output[2 * i])
	sys.stdout.write(' '.join(map(str, output)))


n = int(input().strip())
if n % 2 == 1:
	print(-1)
else:
	print(' '.join([str(i + 1 + (-1) ** (i % 2)) for i in range(n)]))


n = int(input())
if n % 2 == 0:
	print(*[n - x for x in range(n)], sep=' ')
else:
	print(-1)


x = int(input())
if x % 2 == 1:
	print('-1')
else:
	l = [0] * x
	for i in range(x):
		if i % 2 == 0:
			l[i] = i + 2
		elif i % 2 == 1:
			l[i] = i
	for i in range(len(l)):
		print(l[i], end=' ')


def main():
	n = int(input())
	if n % 2 == 1:
		print(-1)
	else:
		ans = []
		for i in range(1, n + 1, 2):
			ans.append(i + 1)
			ans.append(i)
		print(' '.join([str(i) for i in ans]))
main()


dl = int(input())
li = [2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19, 22, 21, 24, 23, 26, 25, 28, 27, 30, 29, 32, 31, 34, 33, 36, 35, 38, 37, 40, 39, 42, 41, 44, 43, 46, 45, 48, 47, 50, 49, 52, 51, 54, 53, 56, 55, 58, 57, 60, 59, 62, 61, 64, 63, 66, 65, 68, 67, 70, 69, 72, 71, 74, 73, 76, 75, 78, 77, 80, 79, 82, 81, 84, 83, 86, 85, 88, 87, 90, 89, 92, 91, 94, 93, 96, 95, 98, 97, 100, 99]
if dl % 2 == 1:
	print(-1)
else:
	print(*li[:dl])


def solve():
	n = int(input())
	if n % 2 == 1:
		print(-1)
	else:
		for i in range(1, n + 1):
			if i % 2 == 1:
				print(str(i + 1), end=' ')
			else:
				print(str(i - 1), end=' ')
solve()


def Sol(n):
	ans = []
	if n % 2 != 0:
		print(-1)
		return
	for i in range(0, n, 2):
		ans.append(i + 2)
		ans.append(i + 1)
	for m in ans:
		print(m, end=' ')
	return
n = int(input())
Sol(n)


try:
	n = int(input())
	if n % 2 != 0:
		print(-1)
	else:
		aux = []
		for i in range(1, n + 1, 2):
			aux.append(i + 1)
			aux.append(i)
		for i in range(len(aux)):
			print(aux[i], end=' ')
except:
	pass


import sys
from math import *
input = sys.stdin.readline
RI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw = lambda : input().strip().split()
ls = lambda : list(input().strip())
from collections import defaultdict as df
import heapq
infinite = float('inf')
n = int(input())
if n % 2 == 1:
	print(-1)
else:
	for i in range(1, n, 2):
		print(i + 1, end=' ')
		print(i, end=' ')


a = int(input())
l = []
for i in range(1, a + 1):
	l.append(i)
if a % 2 != 0:
	print('-1')
else:
	for j in range(len(l) - 1):
		if j % 2 == 0:
			x = l[j]
			l[j] = l[j + 1]
			l[j + 1] = x
		else:
			continue
	print(*l)


in_int = int(input())
return_list = list(range(1, in_int + 1))
if len(return_list) % 2 != 0:
	print(-1)
else:
	for i in range(0, len(return_list) - 1, 2):
		temp = return_list[i]
		return_list[i] = return_list[i + 1]
		return_list[i + 1] = temp
	print(*return_list)


n = int(input())
s = [i for i in range(1, n + 1)]
i = 0
if len(s) % 2 == 0:
	while i < len(s):
		print(s[i + 1], end=' ')
		print(s[i], end=' ')
		i += 2
else:
	print('-1')


r = ''
n = int(input())
if n % 2 == 1:
	print(-1)
else:
	for k in range(1, n, 2):
		r += str(k + 1) + ' ' + str(k) + ' '
print(r)


size = int(input())
a = []
if size % 2 == 1:
	print('-1')
else:
	for i in range(1, size + 1):
		a.append(i)
	for i in range(0, size, 2):
		temp = a[i]
		a[i] = a[i + 1]
		a[i + 1] = temp
	for i in a:
		print(i, end=' ')


n = int(input())
if n % 2 == 0:
	numbers = [str(x) for x in range(1, n + 1)]
	for x in range(0, n, 2):
		(numbers[x], numbers[x + 1]) = (numbers[x + 1], numbers[x])
	print(' '.join(numbers))
else:
	print(-1)


def array(n):
	if n % 2 != 0:
		print(-1)
	else:
		i = 0
		while i < n:
			print(n - i, end=' ')
			i += 1
		print()
n = int(input())
array(n)


n = int(input())
temp = 1
temp2 = 2
if n % 2 != 0:
	print(-1)
else:
	while temp <= n or temp2 <= n:
		print(temp2, end=' ')
		print(temp, end=' ')
		temp += 2
		temp2 += 2


n = int(input())
m = [0 for i in range(n)]
f = 1
if n < 2:
	print(-1)
else:
	for i in range(n):
		m[i] = str(i + 1)
	for i in range(len(m) - 1):
		if i % 2 == 0:
			(m[i], m[i + 1]) = (m[i + 1], m[i])
	for i in range(len(m)):
		if i % 2 == 0 and int(m[i]) % 2 == 1:
			f = 0
	if f == 0:
		print(-1)
	else:
		print(' '.join(m))


a = int(input())
if a % 2 == 1:
	print(-1)
else:
	l = [i + 1 for i in range(a)]
	s = str(l[1]) + ' ' + str(l[0])
	for k in range(1, a // 2):
		(l[2 * k], l[2 * k + 1]) = (l[2 * k + 1], l[2 * k])
		s = s + ' ' + str(l[2 * k]) + ' ' + str(l[2 * k + 1])
	print(s)


x = int(input())
if x % 2 == 0:
	for i in range(2, x + 1, 2):
		print(i, i - 1, sep=' ', end=' ')
else:
	print(-1)


a = [str(x) for x in range(1, int(input()) + 1)]
if len(a) % 2 == 1:
	print(-1)
else:
	for i in range(0, len(a), 2):
		(a[i], a[i + 1]) = (a[i + 1], a[i])
	print(' '.join(a))


n = int(input())
if n % 2:
	print(-1)
else:
	L = [str(k) for k in range(1, n + 1)]
	for k in range(n // 2):
		aux = L[2 * k]
		L[2 * k] = L[2 * k + 1]
		L[2 * k + 1] = aux
	print(' '.join(L))


import sys
n = int(input())
if n % 2 == 1:
	print(-1)
else:
	for i in range(n // 2):
		sys.stdout.write(str(2 * i + 2) + ' ' + str(2 * i + 1) + ' ')


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	ans = list(range(1, n + 1))
	for i in range(0, n, 2):
		temp = ans[i]
		ans[i] = ans[i + 1]
		ans[i + 1] = temp
	print(' '.join((str(x) for x in ans)))


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	l = []
	isOdd = True
	for i in range(1, n + 1):
		if isOdd:
			l.append(i + 1)
		else:
			l.append(i - 1)
		isOdd = not isOdd
	print(' '.join(map(lambda x: str(x), l)))


from math import *
import sys
from sys import *

def gI():
	return map(int, sys.stdin.readline().strip().split())

def gL():
	return list(map(int, sys.stdin.readline().strip().split()))
t = stdin.readline
p = stdout.write
n = int(t())
a = range(n, 0, -1)
print('-1' if n % 2 else ' '.join(map(str, a)))


from math import ceil, log, floor, sqrt
import math
k = 1

def mod_expo(n, p, m):
	result = 1
	while p != 0:
		if p % 2 == 1:
			result = result * n % m
		p //= 2
		n = n * n % m
	return result

def find_order(n):
	if n % 2 == 0:
		print(*[x for x in range(n, 0, -1)], sep=' ')
	else:
		print(-1)
t = 1
while t:
	t = t - 1
	(k, g) = (0, 0)
	points = []
	n = int(input())
	find_order(n)


n = int(input())
if n % 2 == 0:
	print(' '.join(map(str, [x for y in zip(range(2, n + 1, 2), range(1, n + 1, 2)) for x in y])))
else:
	print(-1)


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	i = 1
	while i <= n:
		if n - i + 1 == 3:
			print(str(i + 1) + ' ' + str(i + 2) + ' ' + str(i) + ' ', end='')
			break
		else:
			print(str(i + 1) + ' ' + str(i) + ' ', end='')
			i += 2


import math

def solve(test):
	n = int(input())
	if n % 2 > 0:
		print(-1)
	else:
		for i in range(0, n, 2):
			print(i + 2, i + 1, end=' ')
t = 1
for _ in range(t):
	solve(_ + 1)


import math
n = int(input())
if n % 2 != 0:
	print(-1)
else:
	final_str = ''
	for i in range(n):
		if i % 2 == 0:
			if i == n - 1:
				final_str += str(i + 2)
			else:
				final_str += str(i + 2) + ' '
		elif i == n - 1:
			final_str += str(i)
		else:
			final_str += str(i) + ' '
	print(final_str)


n = int(input())
if n % 2 == 1:
	print(-1)
	exit()
arr = []
for i in range(1, n + 1, 2):
	arr.append(i + 1)
	arr.append(i)
print(*arr)


n = int(input())
X = str()
if n % 2 == 1:
	print(-1)
else:
	x = sorted(list(range(1, n + 1)), reverse=True)
	for i in range(n):
		X += str(str(x[i]) + ' ')
	print(X)


n = int(input())
salida = []
if n % 2 != 0:
	print(-1)
else:
	for i in range(1, n + 1, 2):
		salida.append(str(i + 1))
		salida.append(str(i))
	print(' '.join(salida))


a = int(input())
print(-1) if a % 2 else print(*list((b if b % 2 else b + 2 for b in range(a))))


n = int(input())
if n % 2 == 0:
	a = [0 for j in range(n)]
	for i in range(1, n + 1):
		if i % 2:
			a[i] = i
		else:
			a[i - 2] = i
	for q in a:
		print(q, end=' ')
else:
	print('-1')


n = int(input())
l = []
if n == 1 or n % 2 != 0:
	print('-1')
else:
	for i in range(n):
		l.append(i + 1)
	for i in range(0, n, 2):
		(l[i], l[i + 1]) = (l[i + 1], l[i])
	k = 0
	for i in range(n):
		if l[i] == i + 1:
			k = 1
			break
	if k == 1:
		print('-1')
	else:
		print(*l)


n = int(input())
if n % 2 != 0:
	print('-1')
else:
	for k in range(1, n // 2 + 1):
		print(2 * k, 2 * k - 1, sep=' ', end=' ')


n = int(input())
per = []
ans = []
if n % 2 == 1:
	print('-1')
else:
	for i in range(1, n + 1):
		if i % 2 == 0:
			per.append(i)
	for i in range(1, n + 1):
		if i % 2 == 1:
			per.append(i)
	j = len(per) // 2
	for i in range(0, j):
		ans.append(per[i])
		ans.append(per[j + i])
	print(*ans)


import sys
import math as m

def main():
	pass

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def lts(l):
	s = ''.join(map(str, l))
	return s

def stl(s):
	l = list(s)
	return l

def sq(a, target, arr=[]):
	s = sum(arr)
	if s == target:
		return arr
	if s >= target:
		return
	for i in range(len(a)):
		n = a[i]
		remaining = a[i + 1:]
		ans = sq(remaining, target, arr + [n])
		if ans:
			return ans
mod = int(1000000000.0) + 7

def sinp():
	return sys.stdin.readline().strip()

def iinp():
	return int(input())

def ninp():
	return map(int, sys.stdin.readline().strip().split())

def llinp():
	return list(map(int, sys.stdin.readline().strip().split()))

def p(xyz):
	print(xyz)

def p2(a, b):
	print(a, b)
n = iinp()
if n % 2 != 0:
	print(-1)
else:
	s = 1
	for i in range(n // 2):
		print(s + 1, s, end=' ')
		s = s + 2
print()


import sys
import math
from statistics import mean
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
if n % 2 != 0:
	print(-1)
else:
	for k in range(1, n + 1):
		if k % 2 != 0:
			print(k + 1, end=' ')
		else:
			print(k - 1, end=' ')


n = int(input())
if n % 2 == 1:
	print('-1')
else:
	i = 2
	j = 1
	l = []
	for _ in range(n // 2):
		l.append(i)
		l.append(j)
		i += 2
		j += 2
	print(*l)


n = int(input())
f = 2
s = 1
if n % 2 != 0:
	print('-1')
else:
	while n > 0:
		print(f, s, end=' ')
		f += 2
		s += 2
		n -= 2


n = int(input())
print(*[[i for i in range(n, 0, -1)], [-1]][n & 1])


num = int(input())
a = list(range(1, num + 1))
if num % 2 != 0:
	print('-1')
else:
	for i in range(num)[::2]:
		(a[i], a[i + 1]) = (a[i + 1], a[i])
	print(' '.join(map(str, a)))


n = int(input())
if n % 2 == 1:
	print(-1)
	exit()
r = 1
for i in range(n // 2):
	print(r + 1, r, end=' ')
	r += 2


import sys, bisect
from sys import stdin, stdout
from bisect import bisect_left, bisect_right, bisect, insort, insort_left, insort_right
from math import gcd, ceil, floor, sqrt
from collections import Counter, defaultdict, deque, OrderedDict
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 998244353
mod = 10 ** 9 + 7

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def solve():
	n = inp()
	if n & 1:
		pr(-1)
		return
	l = [i for i in range(n + 1)]
	x = n
	for i in range(1, n // 2 + 1):
		l[i] = x
		l[l[i]] = i
		x -= 1
	print(*l[1:])
for _ in range(1):
	solve()


def main() -> int:
	n = int(input())
	if n % 2 != 0 or n < 2:
		print(-1)
	else:
		result = [i for i in range(n)]
		result[0::2] = result[2::2] + [n]
		print(' '.join((str(i) for i in result)))
	return 0
main()


n = int(input())
s = []
for x in range(n):
	s.append(x + 1)
if n % 2 != 0:
	print(-1)
else:
	for x in s[:-1]:
		if x == s.index(x) + 1:
			(s[x - 1], s[x]) = (s[x], s[x - 1])
	for x in s:
		print(x, end=' ')


def int_lst_input():
	return [int(val) for val in input().split(' ')]

def int_input():
	return int(input())

def print_lst(lst):
	print(' '.join([str(val) for val in lst]))

def solve():
	n = int_input()
	res = [0 for _ in range(n)]
	if n % 2 == 1:
		print(-1)
		return
	else:
		for i in range(0, n, 2):
			res[i] = i + 1
			res[i + 1] = i + 2
			(res[i], res[i + 1]) = (res[i + 1], res[i])
	print_lst(res)
solve()


a = int(input())
if a % 2 == 1:
	print(-1)
else:
	i = -1
	while i < a - 1:
		i = i + 3
		print(i, end=' ')
		i = i - 1
		print(i, end=' ')


def permutation(n):
	ans = []
	if n % 2 == 1:
		ans.append(-1)
	else:
		for i in range(n):
			if i % 2 == 0:
				ans.append(i + 2)
			else:
				ans.append(i)
	for x in ans:
		print(x, end=' ')
permutation(int(input()))


def f(n):
	if n & 1:
		return -1
	l = [0] * n
	for i in range(0, n, 2):
		(l[i], l[i + 1]) = (i + 2, i + 1)
	return ' '.join(map(str, l))
n = int(input())
print(f(n))


from macpath import split
n = int(input())
if n % 2 != 0:
	print(-1)
else:
	for i in range(n, 0, -1):
		print(i, end=' ')


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	print('2 1', end='')
	for i in range(3, n, 2):
		print(f' {i + 1} {i}')


n = int(input())
lisofi = []
if n % 2 == 1:
	print(-1)
else:
	for i in range(1, n + 1):
		if i % 2 == 1:
			lisofi.append(str(i + 1) + ' ')
		else:
			lisofi.append(str(i - 1) + ' ')
print(*lisofi, sep='')


n = int(input())
a = list(range(1, n + 1))
if not n % 2:
	for i in range(0, n, 2):
		(a[i], a[i + 1]) = (str(a[i + 1]), str(a[i]))
	print(' '.join(a))
else:
	print(-1)


size = int(input())
array = [0] * size
seen_List = []
if size % 2 == 0:
	for i in range(size):
		if i not in seen_List:
			j = i + 1
			array[i] = j + 1
			array[j] = j
			seen_List.append(j)
	for i in array:
		print(i, end=' ')
else:
	print(-1)


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	num_list = list(range(n))
	for i in range(0, n, 2):
		temp = num_list[i]
		num_list[i] = num_list[i + 1]
		num_list[i + 1] = temp
	for i in num_list:
		print('{} '.format(i + 1), end='')


n = list(map(int, input().split(' ')))
num = n[0]

def func(num):
	a = 2
	b = 1
	for i in range(int(num / 2)):
		print(a, b, end=' ')
		a += 2
		b += 2
if num % 2 == 1:
	print('-1')
else:
	func(num)


n = int(input())
l1 = []
l2 = []
count = 1
if n % 2 != 0:
	print(-1)
else:
	for i in range(n, 0, -1):
		if count != i:
			l2.append(i)
		else:
			l1.append(i)
		count += 1
	new = l2 + l1
	print(*new)


__author__ = 'Dilshod'
n = int(input())
if n % 2:
	print(-1)
	exit()
for i in range(2, n + 1, 2):
	print(i, i - 1, end=' ')


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	ans = []
	f = 0
	for i in range(1, n + 1):
		if f == 1:
			f = 0
			ans.append(i - 1)
		else:
			f = 1
			ans.append(i + 1)
	print(*ans)


n = int(input())
if n < 2 or n % 10 % 2 != 0:
	print(-1)
else:
	for i in range(1, n + 1, 2):
		print(str(i + 1), str(i), end=' ')


N = int(input())
if N % 2 == 1:
	print(-1)
else:
	solution = []
	for (i, j) in zip(range(0, N, 2), range(1, N, 2)):
		solution.append(j + 1)
		solution.append(i + 1)
	print(' '.join(map(str, solution)))


n = int(input())
li = []
if n % 2 != 0:
	print(-1)
else:
	i = 1
	while i < n:
		li.append(i + 1)
		li.append(i)
		i += 2
	print(*li)


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	a = []
	for i in range(0, n, 2):
		a.append(i + 2)
		a.append(i + 1)
	print(' '.join((repr(y) for y in a)))


import sys
input = sys.stdin.readline
n = int(input())
a = []
if n % 2:
	print(-1)
	sys.exit(0)
(first, second) = (2, 1)
for i in range(n):
	if i % 2 == 0:
		a += [first]
		first += 2
	else:
		a += [second]
		second += 2
print(*a)


import math

class Solution:

	def solution(self):
		n = int(input())
		num = list((str(i) for i in range(n, 0, -1)))
		if n % 2 != 0:
			print(-1)
		else:
			print(' '.join(num))
ob = Solution()
ob.solution()


n = int(input())
if n % 2 == 0:
	print(' '.join([str(idx + 1) if idx % 2 != 0 else str(idx - 1) for idx in range(1, n + 1)]))
else:
	print(-1)


n = int(input())
arr = []
for i in range(1, n):
	if i % 2 == 1:
		arr.append(i + 1)
		arr.append(i)
if len(arr) == n:
	for i in range(n):
		print(arr[i], end=' ')
else:
	print(-1)


def solve(n):
	if n & 1:
		print('-1')
		return
	result = []
	for i in range(1, n + 1):
		result.append(i)
	for i in range(1, n, 2):
		(result[i], result[i - 1]) = (result[i - 1], result[i])
	print(*result)
n = int(input())
solve(n)


sa = int(input())
if sa % 2 == 1:
	print(-1)
else:
	ans = ''
	for x in range(1, int(sa / 2 + 1)):
		ans += str(2 * x)
		ans += ' '
		ans += str(2 * x - 1)
		ans += ' '
	print(ans.strip())


n = int(input())
if n % 2 == 0:
	p = list(range(1, n + 1))
	for i in range(1, n, 2):
		(p[i - 1], p[i]) = (p[i], p[i - 1])
	for x in p:
		print(x, end=' ')
else:
	print(-1)


def reverse(a):
	return a[::-1]
n = int(input())
if n < 2 or n % 2 == 1:
	print(-1)
else:
	p = [i + 1 for i in range(n)]
	res = []
	for i in range(0, n, 2):
		res.extend(reverse(p[i:i + 2]))
	print(' '.join(map(str, res)))


N = int(input())
if N % 2 != 0:
	print(-1)
	exit()
ans = [N - i for i in range(N)]
print(' '.join(map(str, ans)))


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	A = list(range(1, n + 1))
	for i in range(1, n, 2):
		(A[i - 1], A[i]) = (A[i], A[i - 1])
	print(' '.join(map(str, A)))


def per(n):
	if n % 2 != 0:
		print(-1)
	else:
		for i in range(1, n // 2 + 1):
			print(2 * i, 2 * i - 1, end=' ')
a = int(input())
per(a)


inp = int(input())
if inp % 2 != 0:
	print(-1)
else:
	store = []
	for i in range(2, inp + 1, 2):
		store.append(str(i))
		store.append(str(i - 1))
	print(' '.join(store))


n = int(input())
c = []
if n % 2 != 0:
	print(-1)
	exit()
else:
	for i in range(1, n + 1, 2):
		c.append(i + 1)
		c.append(i)
print(*c)


n = int(input())
if n == 1 or n % 2 != 0:
	print('-1')
else:
	l = [i for i in range(1, n + 1) if i % 2 == 0]
	a = [i for i in range(1, n + 1) if i % 2 != 0]
	x = zip(l, a)
	for i in x:
		for j in i:
			print(j, end=' ')


import sys
from collections import Counter as C
n = int(input())
if n & 1:
	print(-1)
else:
	(t, val) = ([], 1)
	while val < n:
		t.append(val + 1)
		t.append(val)
		val += 2
	print(*t)


i = int(input())
if i > 1 and i % 2 == 0:
	print(2, ' ', sep='', end='')
	for j in range(2, i + 1):
		if j % 2 == 0:
			print(j - 1, ' ', sep='', end='')
		else:
			print(j + 1, ' ', sep='', end='')
else:
	print(-1)


n = int(input())
nums = []
for i in range(1, n + 1):
	if i % 2 == 1:
		nums.append(i + 1)
	else:
		nums.append(i - 1)
if n % 2 == 1:
	print(-1)
else:
	print(*nums, sep=' ')


n = int(input())
if n % 2 != 0:
	print('-1')
else:
	a = []
	while n > 0:
		a.append(n)
		n -= 1
	for i in a:
		print(i, end=' ')


n = int(input())
n1 = []
f = 0
if n == 1:
	print('-1')
else:
	for i in range(n, 0, -1):
		n1.append(i)
	for i in range(0, len(n1) - 1):
		if i + 1 == n1[i]:
			f = 1
			break
	if f == 0:
		print(*n1, sep=' ')
	else:
		print('-1')


n = int(input())
l1 = [0] * (n + 1)
if n % 2 != 0:
	print(-1)
else:
	for i in range(1, n + 1):
		for j in range(1, n + 1):
			if i == j:
				pass
			elif l1[j] == 0:
				l1[j] = i
				break
			else:
				pass
	for i in range(1, n + 1):
		print(l1[i], end=' ')


n = int(input())
l = []
if n % 2 == 1:
	print(-1)
else:
	for i in range(2, n + 1, 2):
		l.append(i)
	for i in range(1, n + 1, 2):
		l.insert(i, i)
	print(*l)


n = int(input())
p = list(range(1, n + 1))
if n % 2 == 0:
	lista = ''
	for i in range(0, n, 2):
		tmp = p[i + 1]
		p[i + 1] = p[i]
		p[i] = tmp
	for item in p:
		lista += str(item) + ' '
	print(lista)
else:
	print(-1)


n = int(input())
list1 = [i + 1 for i in range(n)]
if n & 1:
	print(-1)
else:
	for i in range(0, len(list1) - 1, 2):
		(list1[i], list1[i + 1]) = (list1[i + 1], list1[i])
	print(*list1)


n = int(input())
if n == 1:
	print('-1')
else:
	i = 0
	arr = list(range(1, n + 1))
	while True:
		if i < n - 1:
			(arr[i], arr[i + 1]) = (arr[i + 1], arr[i])
			i += 2
		else:
			break
	if arr[-1] == n:
		print(-1)
	else:
		arr = [str(x) for x in arr]
		print(' '.join(arr))


length = int(input())
numList = []
for i in range(1, length + 1):
	numList.append(i)
if length % 2 == 0:
	for j in range(0, len(numList), 2):
		temp = numList[j]
		numList[j] = numList[j + 1]
		numList[j + 1] = temp
	for k in range(0, len(numList)):
		print(numList[k], end=' ')
else:
	print(-1)


def test():
	n = int(input())
	if n % 2 == 1:
		print(-1)
	else:
		for i in range(0, n, 2):
			for j in range(i + 2, i, -1):
				print(j, end=' ')
test()


n = int(input())
a = []
if n % 2 != 0:
	print('-1')
else:
	i = 1
	while i < n:
		a.append(i + 1)
		a.append(i)
		i += 2
	print(*a, sep=' ')


length = int(input())
if length % 2 != 0:
	print('-1')
else:
	permute = [0] * length
	for i in range(1, length + 1):
		if i % 2 == 0:
			permute[i - 1] = i - 1
			continue
		permute[i - 1] = i + 1
	print(' '.join(map(str, permute)))


n = int(input())
perm = []
if n == 1 or n % 2 != 0:
	print(-1)
else:
	for i in range(1, n + 1):
		perm.append(i)
	i = 1
	while i < n:
		(perm[i], perm[i - 1]) = (perm[i - 1], perm[i])
		i += 2
	for i in perm:
		print(i, end=' ')


def main():
	n = int(input())
	if n & 1:
		return (-1,)
	return list(range(n, 0, -1))
print(*main())


n = int(input())
if n % 2 == 1 or n == 0:
	print(-1)
	exit()
a = [item for item in range(1, n + 1)]
for i in range(0, n - 1, 2):
	(a[i], a[i + 1]) = (a[i + 1], a[i])
print(*a)


n = int(input())
if n % 2:
	print(-1)
else:
	print(' '.join((str(v + 2 - v % 2 * 2) for v in range(n))))


n = int(input())
if n % 2:
	print(-1)
else:
	ls = [i for i in range(1, n + 1)]
	for i in range(0, len(ls), 2):
		(ls[i], ls[i + 1]) = (ls[i + 1], ls[i])
	print(' '.join(map(str, ls)))


n = int(input())
p = []
for i in range(1, n + 1):
	if n & 1:
		p.append(-1)
		break
	if i & 1:
		p.append(i + 1)
	else:
		p.append(i - 1)
print(*p, sep=' ')


n = int(input())
mas = []
if n % 2 == 1:
	print(-1)
	exit(0)
for i in range(1, n + 1):
	if i % 2 == 1:
		mas.append(str(i + 1))
	else:
		mas.append(str(i - 1))
print(' '.join(mas))


import sys
permSize = int(input())
if permSize % 2 == 1:
	print('-1')
	sys.exit()
odd = 1
even = 2
for i in range(permSize):
	if i % 2 == 0:
		print(even, end=' ')
		even += 2
	else:
		print(odd, end=' ')
		odd += 2


n = int(input(''))
s = []
for i in range(1, n + 1):
	s.append(i)
if n % 2 == 0:
	for k in range(0, n, 2):
		temp = s[k]
		s[k] = s[k + 1]
		s[k + 1] = temp
	for l in s:
		print(l, end=' ')
else:
	print(-1)


n = int(input())
(l1, l2) = ([], [])
t = 0
if n % 2 != 0:
	print(-1)
else:
	for x in range(1, n + 1):
		if x % 2 == 0:
			l2.append(x)
		else:
			l1.append(x)
	for x in range(n):
		if t == 0:
			print(l2[0], end=' ')
			t = 1
			l2.remove(l2[0])
		else:
			print(l1[0], end=' ')
			t = 0
			l1.remove(l1[0])


n = int(input())
v = []
if n % 2 != 0:
	print(-1)
else:
	for i in range(1, n + 1):
		v.append(i)
	for j in range(0, len(v) - 1, 2):
		(v[j], v[j + 1]) = (v[j + 1], v[j])
	print(*v)


n = int(input())
if n % 2:
	print(-1)
else:
	x = [i for i in range(1, n + 1)]
	for (i, o) in enumerate(x):
		if i % 2:
			(x[i], x[i - 1]) = (x[i - 1], x[i])
	for i in x:
		print(i, end=' ')
	print()


import math

def positions(str):
	for i in str:
		return ord(i) & NUM

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
n = ii()
a = []
for i in range(n):
	a.append(i + 1)
if n % 2:
	print('-1')
else:
	for i in range(0, n - 1, 2):
		(a[i], a[i + 1]) = (a[i + 1], a[i])
	print(*a)


n = int(input())
perm = []
pperm = []
a = 0
for i in range(n):
	perm.append(i + 1)
for i in range(0, n - 1, 2):
	pperm.append(perm[i + 1])
	pperm.append(perm[i])
if n % 2 == 1:
	print(-1)
else:
	for x in range(len(pperm)):
		print(pperm[x], end=' ')


import sys
(mod, MOD) = (1000000007, 998244353)
from math import ceil, floor, log, sqrt, factorial, pi, gcd

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
n = int(input())
if n & 1:
	print(-1)
	exit()
ans = [0] * n
for i in range(n):
	if i & 1:
		ans[i] = i
	else:
		ans[i] = i + 2
print(*ans)


n = int(input())
if n == 1:
	print(-1)
elif n % 2 == 0:
	li = [i for i in range(1, n + 1)]
	for j in range(0, len(li), 2):
		(li[j], li[j + 1]) = (li[j + 1], li[j])
	print(*li)
else:
	print(-1)


import os
import sys
from io import BytesIO, IOBase
import math as M
import itertools as ITR
from collections import defaultdict as D
from collections import Counter as C
from collections import deque as Q
import threading
from functools import lru_cache, reduce
from functools import cmp_to_key as CMP
from bisect import bisect_left as BL
from bisect import bisect_right as BR
import random as R
import string
import cmath, time
enum = enumerate
start_time = time.time()
MOD = 1000000007
MA = float('inf')
MI = float('-inf')
di8 = ((1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1))
di4 = ((1, 0), (0, 1), (-1, 0), (0, -1))

def increase_stack():
	sys.setrecursionlimit(2 ** 32 // 2 - 1)
	threading.stack_size(1 << 27)

def binary(n):
	return bin(n)[2:]

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def maxfactor(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
	if q:
		return q[-1]

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(M.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(int(n))
	l.sort()
	return l

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def seive(n):
	a = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p ** 2, n + 1, p):
				prime[i] = False
		p = p + 1
	for p in range(2, n + 1):
		if prime[p]:
			a.append(p)
	prime[0] = prime[1] = False
	return (a, prime)

def maxPrimeFactors(n):
	maxPrime = -1
	while n % 2 == 0:
		maxPrime = 2
		n >>= 1
	for i in range(3, int(M.sqrt(n)) + 1, 2):
		while n % i == 0:
			maxPrime = i
			n = n / i
	if n > 2:
		maxPrime = n
	return int(maxPrime)

def countchar(s, i):
	c = 0
	ch = s[i]
	for i in range(i, len(s)):
		if s[i] == ch:
			c += 1
		else:
			break
	return c

def str_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
	return q

def lis(arr):
	n = len(arr)
	lis = [1] * n
	maximum = 0
	for i in range(1, n):
		for j in range(0, i):
			if arr[i] > arr[j] and lis[i] < lis[j] + 1:
				lis[i] = lis[j] + 1
				maximum = max(maximum, lis[i])
	return maximum

def lcm(arr):
	a = arr[0]
	val = arr[0]
	for i in range(1, len(arr)):
		gcd = gcd(a, arr[i])
		a = arr[i]
		val *= arr[i]
	return val // gcd

def ncr(n, r):
	return M.factorial(n) // (M.factorial(n - r) * M.factorial(r))

def npr(n, r):
	return M.factorial(n) // M.factorial(n - r)

def IF(c, t, f):
	return t if c else f

def YES(c):
	print(IF(c, 'YES', 'NO'))

def Yes(c):
	print(IF(c, 'Yes', 'No'))

def yes(c):
	print(IF(c, 'yes', 'no'))

def JA(a, sep=' '):
	print(sep.join(map(str, a)))

def JAA(a, s='\n', t=' '):
	return s.join((t.join(map(str, b)) for b in a))

def PS(a, s=' '):
	print(str(a), end=s)

def I():
	return int(inp())

def F():
	return float(inp())

def LI():
	return list(map(int, inp().split()))

def LF():
	return list(map(float, inp().split()))

def MATI(n):
	return [LI() for i in range(n)]

def MATS(n):
	return [list(inp()) for i in range(n)]

def IV():
	return map(int, inp().split())

def FV():
	return map(float, inp().split())

def LS():
	return list(inp())

def S():
	return inp()
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
inp = lambda : sys.stdin.readline().rstrip('\r\n')
TestCases = 0

def solve():
	n = I()
	if n == 1:
		print(-1)
		return
	if n % 2 == 0:
		for i in range(n, 0, -1):
			PS(i)
	else:
		print(-1)
	print()

def main():
	flag = 1
	try:
		sys.stdin = open('c:/Users/Manoj Chowdary/Documents/python/CodeForces/contest-div-2/input.txt', 'r')
		sys.stdout = open('c:/Users/Manoj Chowdary/Documents/python/CodeForces/contest-div-2/output.txt', 'w')
	except:
		flag = 0
	t = 1
	if TestCases:
		t = I()
	for _ in range(1, t + 1):
		solve()
	if flag:
		print('Time: %.4f sec' % (time.time() - start_time))
		localtime = time.asctime(time.localtime(time.time()))
		print(localtime)
		sys.stdout.close()
main()


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	L = list(range(1, n + 1))
	for i in range(0, n, 2):
		t = L[i]
		L[i] = L[i + 1]
		L[i + 1] = t
	for i in range(n - 1):
		print(L[i], end=' ')
	print(L[-1])


def main():
	n = int(input())
	if n % 2 != 0:
		print(-1)
	else:
		l = [x for x in range(1, n + 1)]
		p = [None] * n
		for i in range(0, n - 1, 2):
			p[i] = l[i + 1]
			p[i + 1] = l[i]
		for e in p:
			print(e, end=' ')
main()


n = int(input())
arr = list(range(n, 0, -1))
if n % 2 == 0:
	print(*arr, sep=' ')
else:
	print(-1)


import math
from collections import *
import sys
from functools import reduce

def get_ints():
	return map(int, input().strip().split())

def get_list():
	return list(get_ints())

def get_string():
	return list(input().strip().split())

def printxsp(*args):
	return print(*args, end='')

def printsp(*args):
	return print(*args, end=' ')
UGLYMOD = int(1000000000.0) + 7
SEXYMOD = 998244353
MAXN = int(100000.0)
n = int(input())
if n & 1:
	print('-1')
else:
	for i in range(1, n + 1):
		if i & 1:
			printsp(i + 1)
		else:
			printsp(i - 1)
	print()


permutation_size = int(input())
if permutation_size % 2 != 0:
	print('-1')
else:
	print(' '.join([str(i + 1) if i % 2 != 0 else str(i - 1) for i in range(1, permutation_size + 1)]))


n = int(input())
if n & 1:
	print(-1)
else:
	a = [i for i in range(1, n + 1)]
	for i in range(n):
		a[a[i]] = i
	for i in range(n):
		a[i] += 1
	print(*a)


a = int(input())
x = list()
flag = 0
j = a
f = 0
cnt = 1
if a % 2 != 0:
	f = 1
while j != 0:
	cnt *= j
	j -= 1
for i in range(1, a + 1):
	j = i
	cmt = 1
	while j != 0:
		cmt *= j
		j -= 1
	if i != cnt / cmt:
		x.append(a - i + 1)
		flag = 1
if flag == 0 or f == 1:
	print(-1)
else:
	print(' '.join((str(i) for i in x)))


from itertools import product
from math import ceil

def binary_table(string_with_all_characters, length_to_make):
	return [''.join(x) for x in product(string_with_all_characters, repeat=length_to_make)]

def all_possible_substrings(string):
	return [string[i:j] for i in range(len(string)) for j in range(i + 1, len(string) + 1)]

def number_of_substrings(length):
	return int(length * (length + 1) / 2)

def is_prime(num):
	for i in range(2, num):
		if num / i == int(num / i) and num != i:
			return False
	return True
inp = int(input())
builder = [0] * inp
if inp % 2:
	print(-1)
else:
	for i in range(1, inp + 1):
		builder[-i] = i
	print(*builder)


n = int(input())
if n % 2 != 0:
	print(str(-1))
else:
	l = []
	i = 1
	while i < n:
		l.append(i + 1)
		l.append(i)
		i += 2
	for ind in l:
		print(ind, end=' ')


t = int(input())
if t % 2 != 0:
	print(-1)
else:
	start = 1
	end = t + 1
	for i in range(start, end, 2):
		print(i + 1, i, end=' ')


n = int(input().strip())
if n % 2 != 0:
	print(-1)
else:
	otvet = ''
	for i in range(n, 0, -1):
		otvet = otvet + str(i) + ' '
	print(otvet)


n = int(input().strip())
if n % 2 != 0:
	print(-1)
else:
	ans = [i for i in range(n, 0, -1)]
	print(*ans)


import sys
import math
from sys import stdin, stdout

def sieve(N):
	primeNumbers = [True] * (N + 1)
	primeNumbers[0] = False
	primeNumbers[1] = False
	i = 2
	while i * i <= N:
		j = i
		if primeNumbers[j]:
			while j * i <= N:
				primeNumbers[j * i] = False
				j += 1
		i += 1
	return primeNumbers

def getPrime(N):
	primes = sieve(N)
	result = []
	for i in range(len(primes)):
		if primes[i]:
			result.append(i)
	return result

def factor(N):
	factors = []
	i = 1
	while i * i <= N:
		if N % i == 0:
			factors.append(i)
			if i != N // i:
				factors.append(N // i)
		i += 1
	return sorted(factors)

def reduceB(b):
	mod = 0
	for i in range(0, len(b)):
		mod = (mod * 10 + ord(b[i])) % 1000000007
	return mod

def gcd(a, b):
	if a < b:
		return gcd(b, a)
	if b == 0:
		return a
	return gcd(b, a % b)

def get_ints_in_variables():
	return map(int, sys.stdin.readline().strip().split())

def get_int():
	return int(input())

def get_ints_in_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_list_of_list(n):
	return [list(map(int, sys.stdin.readline().strip().split())) for _ in range(n)]

def get_string():
	return sys.stdin.readline().strip()

def main():
	n = int(input())
	if n % 2 == 0:
		start = 2
		for i in range(0, int(n / 2)):
			print(start, end=' ')
			print(start - 1, end=' ')
			start += 2
		print()
	else:
		print(-1)
main()


class Sol:

	def __init__(self):
		self.n = int(input())

	def evaluate(self):
		p = self.n
		if p % 2 != 0:
			print(-1)
		else:
			while p > 0:
				print(p, end=' ')
				p = p - 1
obj = Sol()
obj.evaluate()


n = int(input())
if n % 2 == 0:
	ar = list(range(1, n + 1))
	for x in range(0, n - 1, 2):
		c = ar[x + 1]
		ar[x + 1] = ar[x]
		ar[x] = c
	print(' '.join(map(str, ar)))
else:
	print(-1)


num = int(input())
if num % 2 == 1:
	print(-1)
else:
	for i in range(1, num + 1):
		if i % 2 == 1:
			print(i + 1)
		else:
			print(i - 1)


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
n = iinput()
a = []
if n % 2 != 0:
	print(-1)
else:
	for i in range(1, n + 1):
		a.append(i)
	i = 0
	while i < n:
		(a[i], a[i + 1]) = (a[i + 1], a[i])
		i += 2
	print(*a)


a = int(input())
if a % 2 != 0:
	print(-1)
else:
	print(*range(a, 0, -1))


n = int(input())
if n == 1 or n % 2 != 0:
	print(-1)
elif n >= 2:
	if n % 2 == 0:
		lst = []
		for i in range(1, n + 1):
			if i % 2 != 0:
				lst.append(i + 1)
			else:
				lst.append(i - 1)
		for item in lst:
			print(item, end=' ')


mass = []
n = int(input())
i = 1
while i <= n:
	mass.append(i)
	i += 1
if n % 2 == 0:
	j = 0
	while j < len(mass):
		print(mass[j + 1], mass[j], end=' ')
		j += 2
else:
	print(-1)


n = int(input())
i = 2
j = 1
if n % 2 != 0:
	print(-1)
	exit()
for q in range(n // 2 - 1):
	print(i, j, end=' ')
	i += 2
	j += 2
print(i, j)


number = int(input())
if number % 2 != 0:
	print(-1)
else:
	lista = [n for n in range(1, number + 1)]
	var = 0
	while var < len(lista):
		(lista[var], lista[var + 1]) = (lista[var + 1], lista[var])
		var += 2
	print(*lista)


import sys
input = sys.stdin.readline
n = int(input())
if n % 2 == 1:
	print('-1')
else:
	print('2 1 ', end='')
	for i in range(3, n, 2):
		print(str(i + 1) + ' ' + str(i), end=' ')


n = int(input())
if n == 1:
	print(-1)
elif n % 2 == 0:
	k = n // 2
	print(2, 1, end=' ')
	i = 2
	while k > 1:
		print(2 + i, 1 + i, end=' ')
		i += 2
		k -= 1
else:
	print(-1)


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	print(*list(reversed(range(1, n + 1))))


d = int(input())
f = []
g = []
k = []
if d % 2 == 0:
	for i in range(1, d + 1):
		if i % 2 == 0:
			f.append(str(i))
		else:
			g.append(str(i))
	for i in range(len(f)):
		l = f[i] + ' ' + g[i]
		k.append(l)
	print(' '.join(k))
else:
	print('-1')


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	arr1 = [2 * int(x) for x in range(1, int((n + 2) / 2))]
	arr2 = [x - 1 for x in arr1]
	for i in range(n // 2):
		print(arr1[i], end=' ')
		print(arr2[i], end=' ')


n = int(input())
p = []
if n % 2 != 0:
	print('-1')
	exit()
for i in range(1, n + 1):
	p.append(i)
for i in range(0, n):
	if p[i] % 2 == 0:
		tmp = p[i - 1]
		p[i - 1] = p[i]
		p[i] = tmp
r = ''.join((str(x) + ' ' for x in p))
print(r)


n = int(input())
even = [i * 2 for i in range(1, 51)]
odd = [i * 2 + 1 for i in range(0, 51)]
even.reverse()
odd.reverse()
l = []
for i in range(n):
	if i % 2 == 0:
		x = even.pop()
	else:
		x = odd.pop()
	if x > n:
		print(-1)
		break
	l.append(x)
if x < n:
	print(*l)


def ii():
	return int(input())

def fi():
	return float(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
import math
n = ii()
if n % 2 == 0:
	for i in range(1, n + 1, 2):
		print(i + 1, end=' ')
		print(i, end=' ')
else:
	print(-1)


permutation_size = int(input())
if permutation_size % 2 == 1:
	print(-1)
else:
	solution = []
	for pos in range(1, permutation_size, 2):
		solution.append(repr(pos + 1))
		solution.append(repr(pos))
	print(' '.join(solution))


import math

def sumofno(n):
	summ = 0
	while n > 0:
		summ += n % 10
		n //= 10
	return summ

def get_key(val, lis):
	for (key, value) in lis.items():
		if value == val:
			return key

def isprime(val):
	c = 0
	for j in range(2, val):
		if val % j == 0:
			return False
	return True
try:
	ans = []
	for i in range(1):
		n = int(input())
		if n % 2 != 0:
			ans.append(-1)
			break
		else:
			m = n // 2
			ann = ''
			for j in range(m):
				j1 = j + 1
				ann += str(2 * j1)
				ann += ' '
				ann += str(2 * j1 - 1)
				ann += ' '
			ans.append(ann)
	for an in ans:
		print(an)
except:
	pass


def ideal_twist(n):
	if n % 2 != 0:
		return [-1]
	return list(range(1, n + 1))[::-1]
print(*ideal_twist(int(input())))


def permutation(n):
	a = []
	if n % 2 == 1:
		return -1
	for i in range(1, n + 1):
		a.append(i)
	for i in range(0, n, 2):
		(a[i], a[i + 1]) = (a[i + 1], a[i])
	return a
n = int(input())
ans = permutation(n)
if ans == -1:
	print(-1)
else:
	print(*permutation(n))


def per(n):
	for i in range(2, n + 1, 2):
		yield i
		yield (i - 1)
n = int(input())
if n & 1:
	print(-1)
else:
	print(*per(n))


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	stri = ''
	for j in range(0, n, 2):
		stri = stri + str(j + 2) + ' '
		stri = stri + str(j + 1) + ' '
	print(stri[:-1])


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	for i in range(n + 1):
		if i % 2 == 0 and i != 0 and (i != n):
			print(i, i - 1, sep=' ', end=' ')
		elif i % 2 == 0 and i == n:
			print(i, i - 1, sep=' ')


from itertools import permutations

def solve(n):
	if n % 2 != 0:
		return -1
	a = []
	for i in range(1, n + 1):
		a.append(i)
	for i in range(0, n, 2):
		(a[i], a[i + 1]) = (a[i + 1], a[i])
	return a
n = int(input())
x = solve(n)
if x == -1:
	print(x)
else:
	for i in x:
		print(i, end=' ')


import sys
n = int(sys.stdin.readline())
result = []
if n % 2 == 0:
	for i in range(1, int(n / 2) + 1):
		t = i * 2
		result.append(str(t))
		result.append(str(t - 1))
	print(' '.join(result))
else:
	print(-1)


def solve(n):
	if n % 2:
		return '-1'
	st = ' '.join(map(str, [x + 1 if x % 2 else x - 1 for x in range(1, n + 1)]))
	return st
res = solve(int(input()))
print(res)


a = int(input())
d = 2
u = 1
dd = []
uu = []
ue = []
t = False
if a == 1:
	print('-1', end='')
else:
	for i in range(1, a, 1):
		dd.append(d)
		d += 2
		dd.append(u)
		u += 2
	for num in dd:
		if num <= a:
			uu.append(num)
	j = 0
	for num2 in uu:
		if a == uu[-1]:
			print('-1')
			break
		else:
			t = True
if t == True:
	ue = ' '.join(map(str, uu))
	print(ue)


n = int(input())
l = [i for i in range(1, n + 1)]
if n % 2 != 0:
	print('-1')
if n % 2 == 0:
	for i in range(0, n, 2):
		z = l[i]
		x = l[i + 1]
		l[i] = x
		l[i + 1] = z
	print(*l)


n = int(input())
if n % 2 == 1 or n == 0:
	print(-1)
	exit()
liste = []
for i in range(1, n + 1):
	liste.append(i)
for i in range(0, n - 1, 2):
	(liste[i], liste[i + 1]) = (liste[i + 1], liste[i])
print(*liste)


import sys

def main():
	n = int(sys.stdin.readline())
	if n % 2 != 0:
		sys.stdout.write('-1\n')
		return
	ret = list(range(1, n + 1))
	for i in range(0, n, 2):
		temp = ret[i]
		ret[i] = ret[i + 1]
		ret[i + 1] = temp
	sys.stdout.write('{}\n'.format(' '.join(map(str, ret))))
main()


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def solve(n):
	if n % 2 != 0:
		return [-1]
	res = []
	for i in range(1, n + 1, 2):
		res.append(i + 1)
		res.append(i)
	return res
n = inp()
print(' '.join(map(str, solve(n))))


n = int(input())
b = ''
if n % 2 == 1:
	print('-1')
else:
	for i in range(1, n + 1, 2):
		b = b + str(i + 1) + ' ' + str(i) + ' '
print(b)


p = int(input())
if p % 2 == 1:
	print(-1)
else:
	print(*sorted((int(X) for X in range(p, 0, -1)))[::-1])


z = int(input())
if z % 2 == 0:
	x = []
	for i in range(z):
		x.append(i + 1)
	d = []
	f = []
	x.reverse()
	for i in x:
		f.append(i)
		if len(f) == 2:
			d.append(f)
			f = []
	e = d[-1]
	d.reverse()
	q = True
	for i in range(1, len(d)):
		e += d[i]
	for o in range(z):
		a = x[i]
		if x[a - 1] != i + 1:
			q = False
	if q:
		for i in e:
			print(end=str(i) + ' ')
	else:
		print(-1)
else:
	print(-1)


def main():
	n = int(input())
	arr = [i for i in range(n + 1)]
	for i in range(1, n // 2 + 1):
		(arr[2 * i - 1], arr[2 * i]) = (arr[2 * i], arr[2 * i - 1])
	arr.pop(0)
	for i in range(n):
		if arr[i] == i + 1:
			print(-1)
			break
	else:
		print(*arr)
main()


n = int(input())
if n % 2 != 0:
	print(-1)
else:
	x = [y for y in range(1, n + 1)]
	for z in range(1, len(x), 2):
		temp = x[z - 1]
		x[z - 1] = x[z]
		x[z] = temp
	x = [str(y) for y in x]
	print(' '.join(x))


t = int(input())
if t % 2 == 1:
	print(-1)
	exit(0)
a = 2
b = 1
for i in range(int(t / 2)):
	print(a, b, end=' ')
	a += 2
	b += 2


n = int(input())
permutation = [0 for _ in range(n)]
if n == 1 or n % 2 != 0:
	print(-1)
else:
	for i in range(1, n + 1):
		permutation[i - 1] = i
	i = 1
	while i < n:
		(permutation[i], permutation[i - 1]) = (permutation[i - 1], permutation[i])
		i += 2
	for i in permutation:
		print(i, end=' ')


def make_perm(n: int):
	for i in range(1, n + 1, 2):
		yield str(i + 1)
		yield str(i)
n = int(input())
if n & 1:
	print(-1)
	quit()
else:
	print(' '.join(make_perm(n)))


n = int(input())
odd = []
even = []
ans = []
if n % 2 == 0:
	for i in range(1, n + 1):
		if i % 2 != 0:
			odd.append(i)
		else:
			even.append(i)
	for i in range(len(odd)):
		ans.append(even[i])
		ans.append(odd[i])
	print(' '.join((str(x) for x in ans)))
else:
	print(-1)


x = int(input())
temp = ''
if x % 2 == 0:
	for i in range(1, x + 1, 2):
		temp += str(i + 1) + ' ' + str(i) + ' '
	print(temp)
else:
	print(-1)


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	nums = [0] * n
	for i in range(1, n, 2):
		nums[i] = i
	for j in range(0, n, 2):
		nums[j] = j + 2
	print(' '.join((str(num) for num in nums)))


import math
a = int(input())
if math.fmod(a, 2) == 1:
	print(-1)
else:
	for i in range(int(a / 2)):
		print((i + 1) * 2, (i + 1) * 2 - 1)


n = int(input())
i = 0
s = ''
c = list(range(1, n + 1))
if n % 2 != 0:
	print('-1')
else:
	while i < n:
		s += str(c[i + 1]) + ' ' + str(c[i]) + ' '
		i += 2
	print(s)


from sys import stdin, stdout
n = int(stdin.readline())
if n > 0 and n % 2 == 0:
	lst = []
	for i in range(1, n + 1, 2):
		lst.append(str(i + 1))
		lst.append(str(i))
	print_line = ' '.join(lst)
	stdout.write(print_line)
else:
	stdout.write('-1')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	if n % 2 == 1:
		return -1
	ans = '2'
	for i in range(1, n):
		if i % 2 == 0:
			ans += ' ' + str(i + 2)
		else:
			ans += ' ' + str(i)
	return ans
print(main())


n = int(input())
if n % 2 is not 0:
	print(-1)
else:
	an = list(range(1, n + 1))
	i = 0
	while i < n:
		(an[i], an[i + 1]) = (an[i + 1], an[i])
		i += 2
	for i in range(n):
		print(an[i], end=' ')
	print()


n = int(input())
if n % 2 == 0:
	p = [i for i in range(1, n + 1)]
	for i in range(0, n, 2):
		(p[i], p[i + 1]) = (p[i + 1], p[i])
	print(*p, sep=' ')
else:
	print(-1)


n = int(input())
p = ''
if n % 2 == 0:
	for i in range(2, n + 1, 2):
		p += str(i) + ' '
		for j in range(1, n + 1, 2):
			if i - 1 == j:
				p += str(j) + ' '
	print(p)
else:
	print(-1)


T_ON = 0
DEBUG_ON = 0
MOD = 998244353

def solve():
	n = read_int()
	if n % 2 == 1:
		print(-1)
		return
	A = list(range(1, n + 1))
	for i in range(0, n, 2):
		(A[i], A[i + 1]) = (A[i + 1], A[i])
	print_nums(A)

def main():
	T = read_int() if T_ON else 1
	for i in range(T):
		solve()

def debug(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
import math
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split()))

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

def is_prime(n):
	if n == 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		if n % i:
			return False
	return True

def gen_primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P
main()


from sys import stdin, stdout, setrecursionlimit
from math import gcd, ceil, sqrt
from collections import Counter, deque
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
setrecursionlimit(100000)
mod = 1000000007
n = ii1()
if n % 2 != 0:
	print(-1)
else:
	arr = list(range(1, n + 1))
	for i in range(0, n, 2):
		(arr[i], arr[i + 1]) = (arr[i + 1], arr[i])
	print(*arr)


import sys
from math import sqrt, floor, factorial
from collections import deque
inp = sys.stdin.readline
read = lambda : list(map(int, inp().strip().split()))

def solve():
	n = int(inp())
	if n % 2 == 0:
		arr = [i + 1 if i % 2 == 1 else i - 1 for i in range(1, n + 1)]
		print(*arr)
	else:
		print(-1)
solve()


def permutation(n):
	l = []
	if n % 2 != 0:
		return -1
	else:
		for i in range(1, n // 2 + 1):
			l.append(2 * i)
			l.append(2 * i - 1)
	return l
n = int(input())
l = permutation(n)
if l == -1:
	print(-1)
else:
	for i in range(0, len(l)):
		print(l[i])


def solve(n):
	s = []
	for i in range(2, n + 1, 2):
		s.append(i)
		s.append(i - 1)
	return s

def main():
	n = int(input())
	if n % 2 == 1:
		print(-1)
	else:
		print(*solve(n))
main()


def funct(n):
	if n % 2 == 1:
		return -1
	A = list(range(1, n + 1))
	for i in range(0, n - 1, 2):
		(A[i], A[i + 1]) = (A[i + 1], A[i])
	return A
n = int(input())
R = funct(n)
if type(R) == int:
	print(R)
else:
	for i in R:
		print(i, end=' ')


n = int(input())
if n % 2 != 0:
	l = -1
	print(l)
else:
	a = 2
	b = 1
	s = str(a) + ' ' + str(b)
	for i in range(2, n, 2):
		s += ' ' + str(a + 2) + ' ' + str(b + 2)
		a += 2
		b += 2
	print(s)


n = int(input())
if n % 2 == 1:
	print(-1)
else:
	print(2, 1, end='')
	counter = 3
	while counter < n:
		print('', counter + 1, counter, end='')
		counter += 2


n = int(input())
I = []
if n % 2 == 1:
	print(-1)
else:
	for i in range(1, n + 1):
		if i % 2 == 1:
			I.append(i + 1)
		else:
			I.append(i - 1)
for i in I:
	print(i, end=' ')


gi = lambda : list(map(int, input().strip().split()))
(n,) = gi()
if n & 1:
	print(-1)
	exit()
print(' '.join([str(k + 1) + ' ' + str(k) for k in range(1, n + 1, 2)]))


from collections import deque
n = int(input())
if n == 1:
	print(-1)
else:
	x = list(map(str, range(1, n + 1)))
	if len(x) % 2 == 0:
		for i in range(0, len(x), 2):
			(x[i], x[i + 1]) = (x[i + 1], x[i])
		print(' '.join(x))
	else:
		print(-1)