Little boy Valera studies an algorithm of sorting an integer array. After studying the theory, he went on to the practical tasks. As a result, he wrote a program that sorts an array of n integers a_1, a_2, ..., a_{n} in the non-decreasing order. The pseudocode of the program, written by Valera, is given below. The input of the program gets number n and array a.

loop integer variable i from 1 to n - 1

    loop integer variable j from i to n - 1

        if (a_{j} > a_{j} + 1), then swap the values of elements a_{j} and a_{j} + 1



But Valera could have made a mistake, because he hasn't yet fully learned the sorting algorithm. If Valera made a mistake in his program, you need to give a counter-example that makes his program work improperly (that is, the example that makes the program sort the array not in the non-decreasing order). If such example for the given value of n doesn't exist, print -1.


-----Input-----

You've got a single integer n (1 ≤ n ≤ 50) — the size of the sorted array.


-----Output-----

Print n space-separated integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 100) — the counter-example, for which Valera's algorithm won't work correctly. If the counter-example that meets the described conditions is impossible to give, print -1.

If there are several counter-examples, consisting of n numbers, you are allowed to print any of them.


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

Output
-1

Difficulty: EASY
Tags: Greedy algorithms

Sorting

Constructive algorithms
Skill types: Sorting

Greedy algorithms

Starter code:

Solutions:
n = int(input())
x = [i for i in range(2, n + 2)]
x[n - 1] = 1
if n < 3:
	print(-1)
else:
	for v in x:
		print(v, end=' ')


n = int(input())
if n < 3:
	print(-1)
else:
	for i in range(n, 0, -1):
		print(i)


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:
	print(-1)
else:
	print(*[x for x in range(n, 0, -1)])


n = input()
n = int(n)
if n <= 2:
	print(-1)
elif n <= 50:
	result = [i for i in range(n, 0, -1)]
	for el in result:
		print(el, end=' ')
else:
	print(-1)


n = int(input())
if n == 1 or n == 2:
	print(-1)
else:
	print('8', '18', '7', end=' ')
	for i in range(n - 3):
		print(1, end=' ')


n = int(input())
if n < 3:
	print(-1)
else:
	a = list()
	for i in range(n - 2):
		a.append(i + 1)
	a.insert(0, n - 1)
	a.insert(0, n)
	for i in a:
		print(i, end=' ')


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


n = int(input())
if n == 1 or n == 2:
	print(-1)
else:
	l = [i for i in range(1, n + 1)]
	l.sort(reverse=True)
	print(*l)


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


import sys
import math
from collections import defaultdict

def read_line():
	return sys.stdin.readline()[:-1]

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

def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]

def fun(a, v):
	for (i, k) in enumerate(a[::-1]):
		if v >= k:
			return (k, 8 - i)
	return -1
n = read_int()
if n <= 2:
	print(-1)
else:
	for i in range(1, n + 1):
		print(n + 1 - i, end=' ')
	print()


import sys
import 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(n, 0, -1):
		print(i, end=' ')


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


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


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


import sys
n = int(sys.stdin.readline())
if n <= 2:
	print(-1)
	return
res = []
for i in range(2, n + 1):
	res.append(str(i))
res.append(str(1))
print(' '.join(res))


n = int(input())
f = []
for j in range(n):
	f.append(j + 1)
if n <= 2:
	print(-1)
else:
	print(*f[::-1])


a = int(input())
if a == 1 or a == 2:
	print(-1)
else:
	x = ''
	x += (a - 1) * '2 '
	x += '1'
	print(x)


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


def s(a):
	k = len(a)
	for i in range(k - 1):
		for j in range(i, k - 1):
			if a[j] > a[j + 1]:
				(a[j], a[j + 1]) = (a[j + 1], a[j])
	return a

def main():
	n = int(input())
	if n <= 2:
		v = [-1]
	else:
		v = [int(i) for i in range(n, 0, -1)]
	print(*v, sep=' ')
main()


try:
	n = int(input())
	ans = '-1' if n <= 2 else ' '.join([str(i) for i in range(n, 0, -1)])
	print(ans)
except EOFError as e:
	pass


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


def main():
	n = int(input())
	if n < 3:
		print(-1)
	else:
		print(*list(range(n, 0, -1)))
main()


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


n = int(input())
if n == 1 or n == 2:
	print('-1')
else:
	l = ['2']
	l += ['3'] * (n - 2)
	l += ['1']
	print(' '.join(l))


a = int(input())
if a <= 2:
	print(-1)
else:
	print(' '.join(list(map(str, range(1, a + 1)))[::-1]))


n = int(input())
print(*[[2, 2] + [1] * (n - 2), [-1]][n < 3])


import sys
n = int(input())
if n > 2:
	lst = list(range(n - 1, 0, -1))
	lst.insert(0, n - 1)
	for i in lst:
		print(i, end=' ')
else:
	print(-1)


__copyright__ = ''
__author__ = 'Son-Huy TRAN'
__email__ = 'sonhuytran@gmail.com'
__doc__ = ''
__version__ = '1.0'

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

def __starting_point():
	exit(main())
__starting_point()


n = int(input())
a = [n - i for i in range(n)]

def so(n, a):
	for i in range(n - 1):
		for j in range(i, n - 1):
			(a[j], a[j + 1]) = (a[j + 1], a[j])
if n in (1, 2):
	print(-1)
else:
	print(' '.join(map(str, a)))


X = int(input())
if X <= 2:
	print(-1)
	exit()
print(*[i for i in range(X, 0, -1)])


n = int(input())
if n == 1 or n == 2:
	print(-1)
else:
	lst = list(range(1, n + 1))
	(a, b) = (lst.pop(), lst.pop())
	lst = [a, b] + lst
	print(*lst)


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


n = int(input())
if n < 3:
	print(-1)
else:
	print(*list(range(n, 0, -1)))


R = lambda : map(int, input().split())
(n,) = R()
print(-1 if n <= 2 else ' '.join([str(i) for i in range(n, 0, -1)]))


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


def unlucky(n):
	if n <= 2:
		return [-1]
	a = list()
	for i in range(n, -1, -1):
		a.append(i)
	return a[:-1]
print(*unlucky(int(input())))


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


import bisect
from itertools import accumulate
import os
import sys
import math
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))

def input():
	return sys.stdin.readline().rstrip('\r\n')
n = int(input())
if n == 1 or n == 2:
	print(-1)
else:
	for i in range(n, 0, -1):
		print(i, end=' ')


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


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


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


n = int(input())
if n <= 2:
	print(-1)
else:
	print('2 ' * (n - 1) + '1')


def main():
	n = int(input())
	if n < 3:
		print('-1')
		return
	arr = [str(i) for i in range(n, 0, -1)]
	print(' '.join(arr))
main()


a = int(input())
if (a == 2) | (a == 1):
	print(-1)
else:
	while a > 0:
		print(a, end=' ')
		a = a - 1


n = int(input())
if n < 3:
	print(-1)
else:
	while n > 0:
		print(n, end=' ')
		n -= 1


n = int(input())
print(-1 if n < 3 else ' '.join(['100'] * (n - 1) + ['1']))


n = int(input())
if n == 1 or n == 2:
	print(-1)
else:
	ans = [1] * n
	ans[0] = 10
	ans[1] = 9
	print(*ans)


n = int(input())
if n < 3:
	print(-1)
	exit()
for i in range(n, 0, -1):
	print(i, end=' ')


def main():
	n = int(input())
	if n < 3:
		print(-1)
	else:
		print(' '.join([str(x) for x in range(n, 0, -1)]))
main()


def main_function():
	a = int(input())
	if a > 2:
		return ' '.join([str(a - i) for i in range(a)])
	return -1
print(main_function())


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


n = int(input())
res = ''
if n < 3:
	print(-1)
else:
	for u in range(-n, 0):
		res = res + '{} '.format(-u)
	print(res[:-1])


n = int(input())
if n <= 2:
	print(-1)
else:
	ans = [3, 2, 1] + [1] * (n - 3)
	print(*ans)


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


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


def main():
	n = int(input())
	if n <= 2:
		v = [-1]
	else:
		v = [int(i) for i in range(n, 0, -1)]
	print(*v, sep=' ')

def __starting_point():
	main()
__starting_point()


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


a = int(input(''))
if a == 1 or a == 2:
	print(-1)
else:
	for g in range(a, 0, -1):
		print(g)


n = int(input())
if n < 3:
	print(-1)
else:
	s = [100, 2] + [1] * (n - 2)
	print(' '.join(map(str, s)))


a = int(input())
if a == 1 or a == 2:
	print('-1')
else:
	i = a
	while i > 0:
		print(i, end=' ')
		i -= 1
	print()


n = int(input())
if n == 1 or n == 2:
	print(-1)
else:
	i = n
	while i >= 1:
		print(i, end=' ')
		i -= 1


def buggy_sort(n):
	if n <= 2:
		print(-1)
		return
	else:
		t = 100
		a = []
		for i in range(55):
			a.append(t)
			t = t - 1
		for i in range(n):
			print(a[i], end=' ')
n = int(input(''))
buggy_sort(n)


n = int(input())
if n < 3:
	print(-1)
else:
	print(' '.join(list(map(str, list(range(n, 0, -1))))))


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


n = int(input())
m = []
for i in range(1, n + 1):
	m.append(n + 1 - i)
a = list(m)
a.sort()
for i in range(n - 1):
	for j in range(i, n - 1):
		if m[j] > m[j + 1]:
			(m[j], m[j + 1]) = (m[j + 1], m[j])
if m == a:
	print(-1)
else:
	a.reverse()
	print(*a, sep=' ')


n = int(input())
if n < 3:
	print(-1)
else:
	print(' '.join(map(str, [i for i in range(n, 0, -1)])))


n = int(input())
print(*((-1,), range(n, 0, -1))[n > 2])


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


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


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


__autor__ = 'Esfandiar'
n = int(input())
if n < 3:
	print(-1)
	exit()
print(5, 4, end=' ')
for i in range(n - 2):
	print(1, end=' ')


sa = int(input())
string = ''
if sa == 1 or sa == 2:
	print('-1')
else:
	for x in range(sa, 0, -1):
		string += str(x)
		string += ' '
	print(string.strip())


N = int(input())
if N < 3:
	print(-1)
else:
	for i in range(N, 0, -1):
		print(i, end=' ')


n = int(input())
if n <= 2:
	print('-1')
else:
	ans = []
	while n > 0:
		ans.append(n)
		n -= 1
	print(*ans)


x = int(input())
if x < 3:
	print('-1')
else:
	for i in range(x):
		print(x - i, end=' ')


from sys import stdin, stdout
import bisect
import math

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 soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

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


import math

def solve(n):
	if n <= 2:
		return [-1]
	return [i for i in range(n, 0, -1)]

def main():
	n = int(input())
	print(*solve(n))
main()


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


def counterExample(n):
	res = [i for i in range(1, n + 1)]
	return ' '.join((str(i) for i in reversed(res))) if n > 2 else -1
n = int(input())
print(counterExample(n))


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


sz = int(input())
if sz < 3:
	print(-1)
else:
	print(*reversed([x + 1 for x in range(sz)]))


n = int(input())
if n <= 2:
	print(-1)
else:
	x = [4, 3, 2]
	y = [1] * (n - 3)
	print(*x + y)


import sys
input = sys.stdin.readline

def gint():
	return int(input())

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

def gfloat():
	return float(input())

def gfloat_arr():
	return list(map(float, input().split()))

def pair_int():
	return map(int, input().split())
INF = 1 << 31
MOD = '1000000007'
dx = [-1, 0, 1, 0]
dy = [0, 1, 0, -1]
n = gint()
if n <= 2:
	print(-1)
else:
	for i in range(n):
		print(n - i, end=' ')


n = eval(input())
a = ''
if n == 1 or n == 2:
	print(-1)
else:
	i = 0
	j = 100
	while i < n:
		a += str(j)
		a += ' '
		i += 1
		j -= 1
	print(str(a))


n = int(input())
if n <= 2:
	print(-1)
else:
	l = [9] * (n - 1)
	l.append(1)
	print(*l, sep=' ')


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


def main(n):
	if n <= 2:
		return '-1'
	l = list(reversed(list(range(1, n + 1))))
	return ' '.join(list(map(str, l)))
print(main(int(input())))


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


n = int(input())
if n > 2:
	print(*tuple(range(n + 1)[:0:-1]))
else:
	print(-1)


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


import sys
from functools import reduce
from collections import Counter
import time
import datetime
import math

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

def sip():
	return sys.stdin.readline()

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

def mips():
	return map(str, sys.stdin.readline().split())

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

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.insert(i, arr)
	return lst

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 minJumps(arr, n):
	jumps = [0 for i in range(n)]
	if n == 0 or arr[0] == 0:
		return float('inf')
	jumps[0] = 0
	for i in range(1, n):
		jumps[i] = float('inf')
		for j in range(i):
			if i <= j + arr[j] and jumps[j] != float('inf'):
				jumps[i] = min(jumps[i], jumps[j] + 1)
				break
	return jumps[n - 1]

def dic(arr):
	return Counter(arr)

def check_prime(n):
	if n < 2:
		return False
	for i in range(2, int(n ** 0.5) + 1, 2):
		if n % i == 0:
			return False
	return True
n = ip()
if n == 1 or n == 2:
	print(-1)
else:
	for i in range(n, 0, -1):
		print(i, end=' ')
print()


inf = 1001

def merge(L, n1, R, n2):
	L.append(inf)
	R.append(inf)
	a = []
	i = j = 0
	while i < n1 or j < n2:
		if L[i] < R[j]:
			a.append(L[i])
			i += 1
		else:
			a.append(R[j])
			j += 1
	return a

def msort(a, n):
	if n == 1:
		return a
	else:
		n1 = n // 2
		n2 = n - n1
		L = a[:n1]
		R = a[n1:]
		L = msort(L, n1)
		R = msort(R, n2)
		return merge(L, n1, R, n2)

def buggy(a, n):
	for i in range(n - 1):
		for j in range(i, n - 1):
			if a[j] > a[j + 1]:
				temp = a[j]
				a[j] = a[j + 1]
				a[j + 1] = temp
	return a
n = int(input())
a = []
k = 100
if n <= 2:
	for f in range(n):
		a.append(k - f)
else:
	a = [3, 2, 1]
	for i in range(n - 3):
		a.append(k - i)
r = a[:]
answer = msort(r, n)
buggy_result = buggy(r, n)
if buggy_result == answer:
	print(-1)
else:
	for x in a:
		print(x, end=' ')