This is an interactive problem. In the interaction section below you will see the information about flushing the output.

In this problem, you will be playing a game with Hongcow. How lucky of you!

Hongcow has a hidden n by n matrix M. Let Mi, j denote the entry i-th row and j-th column of the matrix. The rows and columns are labeled from 1 to n.

The matrix entries are between 0 and 109. In addition, Mi, i = 0 for all valid i. Your task is to find the minimum value along each row, excluding diagonal elements. Formally, for each i, you must find <image>.

To do this, you can ask Hongcow some questions.

A question consists of giving Hongcow a subset of distinct indices {w1, w2, ..., wk}, with 1 ≤ k ≤ n. Hongcow will respond with n integers. The i-th integer will contain the minimum value of min1 ≤ j ≤ kMi, wj.

You may only ask Hongcow at most 20 questions — he thinks you only need that many questions answered.

When you are ready to answer, print out a single integer  - 1 on its own line, then n integers on the next line. The i-th integer should be the minimum value in the i-th row of the matrix, excluding the i-th element. Do not forget to flush the final answer as well. Printing the answer does not count as asking a question.

You will get Wrong Answer verdict if 

  * Your question or answers are not in the format described in this statement. 
  * You ask strictly more than 20 questions. 
  * Your question contains duplicate indices. 
  * The value of k in your question does not lie in the range from 1 to n, inclusive. 
  * Your final answer is not correct. 

You will get Idleness Limit Exceeded if you don't print anything or if you forget to flush the output, including for the final answer (more info about flushing output below).

Input

The first line of input will contain a single integer n (2 ≤ n ≤ 1, 000).

Output

To print the final answer, print out the string -1 on its own line. Then, the next line should contain n integers. The i-th integer should be the minimum value of the i-th row of the matrix, excluding elements on the diagonal. Do not forget to flush your answer!

Interaction

To ask a question, print out a single integer k on its own line, denoting the size of your subset. Then, the next line should contain k integers w1, w2, ... wk. Note, you must flush your output to get a response.

Hongcow will respond by printing out a line with n integers. The i-th integer in this line represents the minimum value of Mi, wj where j is between 1 and k.

You may only ask a question at most 20 times, otherwise, you will get Wrong Answer.

To flush you can use (just after printing an integer and end-of-line): 

  * fflush(stdout) in C++; 
  * System.out.flush() in Java; 
  * stdout.flush() in Python; 
  * flush(output) in Pascal; 
  * See the documentation for other languages. 



Hacking To hack someone, use the following format 
    
    
      
    n  
    M_{1,1} M_{1,2} ... M_{1,n}  
    M_{2,1} M_{2,2} ... M_{2,n}  
    ...  
    M_{n,1} M_{n,2} ... M_{n,n}  
    

Of course, contestant programs will not be able to see this input.

Examples

Input

3
0 0 0
2 7 0
0 0 4
3 0 8
0 5 4

Output

3
1 2 3
1
3
2
1 2
1
2
1
1
-1
2 5 4


Input

2
0 0
0 0

Output

1
2
1
1
-1
0 0

Note

In the first sample, Hongcow has the hidden matrix 
    
    
      
    [  
     [0, 3, 2],  
     [5, 0, 7],  
     [4, 8 ,0],  
    ]  
    

Here is a more readable version demonstrating the interaction. The column on the left represents Hongcow, while the column on the right represents the contestant. 
    
    
      
    3  
                  3  
                  1 2 3  
    0 0 0  
                  1  
                  3  
    2 7 0  
                  2  
                  1 2  
    0 0 4  
                  1  
                  2  
    3 0 8  
                  1  
                  1  
    0 5 4  
                  -1  
                  2 5 4  
    

For the second sample, it is possible for off-diagonal elements of the matrix to be zero.

Difficulty: HARD
Tags: Bit manipulation

Divide and conquer
Skill types: Bit manipulation

Starter code:

Solutions:
from sys import stdout

def g(k, p):
	print(str(k) + '\n' + ' '.join(map(str, p)))
	stdout.flush()
n = int(input())
s = [9000000000.0] * n

def f(q):
	global s
	p = [k + 1 for (k, v) in enumerate(q) if v]
	g(len(p), p)
	s = [i if j else min(i, int(k)) for (i, j, k) in zip(s, q, input().split())]
	return [not v for v in q]
k = 1
while k < n:
	f(f([not i & k for i in range(n)]))
	k *= 2
g(-1, s)


from sys import stdout
n = int(input())
ans = [10 ** 10] * n
th = 1
while th < n:
	ask = [i % (2 * th) < th for i in range(n)]
	for _ in range(2):
		inds = [key for (key, value) in enumerate(ask) if value]
		print(len(inds))
		print(' '.join([str(i + 1) for i in inds]))
		stdout.flush()
		reply = list(map(int, input().split(' ')))
		ans = [ans[i] if ask[i] else min(ans[i], reply[i]) for i in range(n)]
		ask = [not v for v in ask]
	th *= 2
print(-1)
print(' '.join(map(str, ans)))
stdout.flush()


import math, sys, re, itertools, pprint, collections, copy
(rs, ri, rai, raf) = (input, lambda : int(input()), lambda : list(map(int, input().split())), lambda : list(map(float, input().split())))
pai = lambda x: print(' '.join(map(str, x)))
n = ri()
line_min = [float('inf') for _ in range(n)]
requests = []

def init_requests():
	requests.append([[(1, n // 2)], [(n // 2 + 1, n)]])
	while True:
		(l, r) = requests[-1]
		(ln, rn) = ([], [])
		for (i, j) in l + r:
			if j - i > 0:
				ln.append((i, (i + j) // 2))
				rn.append(((i + j) // 2 + 1, j))
		if len(ln) == 0 and len(rn) == 0:
			break
		requests.append([ln, rn])

def make_request(a: list):
	print(len(a))
	print(' '.join(map(str, a)))
	sys.stdout.flush()
	ans = rai()
	for i in range(n):
		if i + 1 not in a:
			line_min[i] = min(line_min[i], ans[i])
init_requests()
for (l, r) in requests:
	la = []
	for lr in l:
		la += list(range(lr[0], lr[1] + 1))
	make_request(la)
	ra = []
	for rr in r:
		ra += list(range(rr[0], rr[1] + 1))
	make_request(ra)
print(-1)
pai(line_min)


inf = 10 ** 10
n = int(input())
m = 1
while not n < 2 ** m:
	m += 1
u = []
v = []
for i in range(m):
	u.append([])
	v.append([])
	for j in range(n):
		if j & 1 << i:
			u[i].append(j + 1)
		else:
			v[i].append(j + 1)
s = []
t = []
for i in range(m):
	if len(u[i]) == 0:
		values = [inf] * n
	else:
		line = ' '.join(map(str, u[i]))
		print(len(u[i]))
		print(line, flush=True)
		values = list(map(int, input().split()))
	s.append(values)
for i in range(m):
	if len(v[i]) == 0:
		values = [inf] * n
	else:
		line = ' '.join(map(str, v[i]))
		print(len(v[i]))
		print(line, flush=True)
		values = list(map(int, input().split()))
	t.append(values)
res = []
for j in range(n):
	r = inf
	for i in range(m):
		if j & 1 << i:
			r = min(r, t[i][j])
		else:
			r = min(r, s[i][j])
	res.append(r)
print(-1, flush=True)
line = ' '.join(map(str, res))
print(line, flush=True)


import sys

def f(x, y):
	if not x:
		return y
	elif not y:
		return x
	else:
		return min(x, y)
count = 0

def req(old, lst):
	global count
	if count < 20:
		print(len(lst))
		print(' '.join(map(lambda x: str(x + 1), lst)))
		sys.stdout.flush()
		current = list(map(int, input().split()))
		for i in range(n):
			if i in lst:
				current[i] = BIG
		old = list(map(min, old, current))
		count += 1
	return old
BIG = 10000000000
n = int(input())
mask = 1
res = [BIG] * n
while mask <= n:
	a = [x for x in range(n) if x & mask]
	b = [x for x in range(n) if not x & mask]
	if a and b:
		res = req(res, a)
		res = req(res, b)
		if count == 20:
			break
	mask <<= 1
print(-1)
print(' '.join(map(str, res)))
sys.stdout.flush()


import sys
n = int(input())
MAX = 2000 * 1000 * 1000
res = [MAX] * n
k = 1
while k < n:
	x = [0] * n
	output = []
	sz = 0
	for i in range(0, n, 2 * k):
		for j in range(0, min(n - i, k)):
			output.append(i + j + 1)
			sz += 1
			x[i + j] = 1
	print(sz, end=' ')
	print(' '.join(map(str, output)))
	sys.stdout.flush()
	a = list(map(int, input().split()))
	for i in range(len(a)):
		if a[i] != 0 or x[i] == 0:
			res[i] = min(res[i], a[i])
	x = [0] * n
	output = []
	sz = 0
	for i in range(k, n, 2 * k):
		for j in range(0, min(n - i, k)):
			output.append(i + j + 1)
			x[i + j] = 1
			sz += 1
	print(sz, end=' ')
	print(' '.join(map(str, output)))
	sys.stdout.flush()
	a = list(map(int, input().split()))
	for i in range(len(a)):
		if a[i] != 0 or x[i] == 0:
			res[i] = min(res[i], a[i])
	k *= 2
print(-1)
for i in range(n):
	if res[i] != MAX:
		print(res[i], end=' ')
	else:
		print(0, end=' ')
print()
sys.stdout.flush()


import sys
n = int(input())
mn = [float('inf') for _ in range(n)]
ln = len(bin(n)) - 3
cnt = 0
for bit in range(ln, -1, -1):
	query = []
	inv_query = []
	for i in range(1, n + 1):
		if i & 1 << bit:
			query.append(i)
		else:
			inv_query.append(i)
	print(len(query))
	print(' '.join(map(str, query)))
	sys.stdout.flush()
	ans = list(map(int, input().split()))
	for i in inv_query:
		mn[i - 1] = min(mn[i - 1], ans[i - 1])
	print(len(inv_query))
	print(' '.join(map(str, inv_query)))
	sys.stdout.flush()
	ans = list(map(int, input().split()))
	for i in query:
		mn[i - 1] = min(mn[i - 1], ans[i - 1])
print(-1)
print(' '.join(map(str, mn)))
sys.stdout.flush()


n = int(input().strip())
import math
import sys
factor = 1
each_row_min = [10000000000] * n
for i in range(int(math.log(n, 2)) + 1):
	if factor >= n:
		break
	mask = []
	comp_mask = []
	for j in range(n):
		if j // factor % 2 == 0:
			mask.append(j)
		else:
			comp_mask.append(j)
	print(len(mask))
	print(' '.join([str(x + 1) for x in mask]))
	sys.stdout.flush()
	results = [int(x) for x in input().split()]
	for (row, rowmin) in enumerate(results):
		if row not in mask:
			each_row_min[row] = min(each_row_min[row], rowmin)
	mask = comp_mask
	print(len(mask))
	print(' '.join([str(x + 1) for x in mask]))
	sys.stdout.flush()
	results = [int(x) for x in input().split()]
	for (row, rowmin) in enumerate(results):
		if row not in mask:
			each_row_min[row] = min(each_row_min[row], rowmin)
	factor *= 2
print(-1)
print(' '.join((str(x) for x in each_row_min)))
sys.stdout.flush


from re import *
from sys import *

def readint():
	return int(input())

def readfloat():
	return float(input())

def readarray(N, foo=input):
	return [foo() for i in range(N)]

def readlinearray(foo=int):
	return list(map(foo, input().split()))

def NOD(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def gen_primes(max):
	primes = [1] * (max + 1)
	for i in range(2, max + 1):
		if primes[i]:
			for j in range(i + i, max + 1, i):
				primes[j] = 0
	primes[0] = 0
	return [x for x in range(max + 1) if primes[x]]

def is_prime(N):
	i = 3
	if not N % 2:
		return 0
	while i * i < N:
		if not N % i:
			return 0
		i += 3
	return 1
n = readint()
data = [10 ** 9 for i in range(n)]
bits = 0
while 1 << bits < n:
	bits += 1
for b in range(bits):
	question = set([i + 1 for i in range(n) if i & 1 << b])
	stdout.write('%d\n%s\n' % (len(question), ' '.join(map(str, question))))
	stdout.flush()
	answer = readlinearray()
	for i in range(n):
		if i + 1 not in question:
			data[i] = min(data[i], answer[i])
	question = set([i + 1 for i in range(n) if not i & 1 << b])
	stdout.write('%d\n%s\n' % (len(question), ' '.join(map(str, question))))
	stdout.flush()
	answer = readlinearray()
	for i in range(n):
		if i + 1 not in question:
			data[i] = min(data[i], answer[i])
stdout.write('-1\n%s\n' % (' '.join(map(str, data)),))
stdout.flush()


import sys
import math
import itertools
n = int(input())
l = n.bit_length()
A = [float('inf')] * n
for i in range(l):
	digits = map(lambda x: x >> i & 1, range(1, n + 1))
	question = list(filter(lambda x: x >> i & 1, range(1, n + 1)))
	print(len(question))
	print(' '.join(map(str, question)))
	sys.stdout.flush()
	answer1 = [int(x) for x in input().split()]
	question = list(filter(lambda x: not x >> i & 1, range(1, n + 1)))
	print(len(question))
	print(' '.join(map(str, question)))
	sys.stdout.flush()
	answer2 = [int(x) for x in input().split()]
	for (x, d) in enumerate(digits):
		A[x] = min(A[x], answer2[x]) if d else min(A[x], answer1[x])
print(-1)
print(' '.join(map(str, A)))
sys.stdout.flush()