You are given a sequence $b_1, b_2, \ldots, b_n$. Find the lexicographically minimal permutation $a_1, a_2, \ldots, a_{2n}$ such that $b_i = \min(a_{2i-1}, a_{2i})$, or determine that it is impossible.


-----Input-----

Each test contains one or more test cases. The first line contains the number of test cases $t$ ($1 \le t \le 100$).

The first line of each test case consists of one integer $n$ — the number of elements in the sequence $b$ ($1 \le n \le 100$).

The second line of each test case consists of $n$ different integers $b_1, \ldots, b_n$ — elements of the sequence $b$ ($1 \le b_i \le 2n$).

It is guaranteed that the sum of $n$ by all test cases doesn't exceed $100$.


-----Output-----

For each test case, if there is no appropriate permutation, print one number $-1$.

Otherwise, print $2n$ integers $a_1, \ldots, a_{2n}$ — required lexicographically minimal permutation of numbers from $1$ to $2n$.


-----Example-----
Input
5
1
1
2
4 1
3
4 1 3
4
2 3 4 5
5
1 5 7 2 8

Output
1 2 
-1
4 5 1 2 3 6 
-1
1 3 5 6 7 9 2 4 8 10

Difficulty: interview

Starter code:

Solutions:
from sys import stdin,stderr
def rl():
    return [int(w) for w in stdin.readline().split()]

def solve(n, b):
    f = [True for i in range(2*n+1)]
    for x in b:
        if not f[x]:
            return [-1]
        f[x] = False
    a = []
    for x in b:
        a.append(x)
        for y in range(x+1, 2*n+1):
            if f[y]:
                a.append(y)
                f[y] = False
                break
        else:
            return [-1]
    return a

t, = rl()
for _ in range(t):
    print(*solve(rl()[0], rl()))


# Код программы написал на языке Python 3
import sys
import bisect

def main():
    n =  int(sys.stdin.readline())
    q = [int(i) for i in sys.stdin.readline().split()]
    w = []
    for i in range(1, 2 * n + 1):
        if i not in q:
            w.append(i)
    w.sort()
    res = [0 for i in range(2*n)]
    for i in range(n):
        res[i * 2] = q[i]
    for i in range(n - 1):
        e = bisect.bisect(w, q[i])
        if e != n - i:
            r = w[e]
            del w[e]
            res[i * 2 + 1] = r
        else:
            print(-1)
            return 0
    if w[-1] < q[-1]:
        print(-1)
        return 0
    else:
        res[-1] = w[-1]
        print(*res)
    
        
for test in range(int(sys.stdin.readline())):
    main()

t=int(input())

def f():
    n=int(input())
    b=list(map(int,input().split()))
    a=[b[i//2] if i % 2==0 else 0 for i in range(n*2)]
    used = 2*n*[0]+[0]
    for i in a:
        used[i] = 1
    for i in range(1,2*n,2):
        l = a[i-1]
        j=l+1
        while j<=2*n and used[j]:
            j+=1
        if j>2*n:
            print(-1)
            return
        a[i] = j
        used[j]=1
    print(*a)

for tt in range(t):
    f()

# from collections import defaultdict

for _ in range(int(input())):
	n = int(input())
	b = list(map(int, input().split()))
	a = []
	taken = [False] * (2*n+1)
	for bi in b: taken[bi] = True
	
	for bi in b:
		a.append(bi)
		next = bi+1
		while next <= 2*n and taken[next]:
			next += 1

		if next <= 2*n:
			a.append(next)
			taken[next] = 1
		else:
			break

	if len(a) == 2*n:
		print(' '.join(map(str, a)))
	else:
		print(-1)



for t in range(int(input())):
    n = int(input())
    l = [int(i) for i in input().split()]
    visited = [0 for i in range(2 * n)]
    res = []
    for i in l:
        visited[i - 1] = 1
    for i in l:
        temp = i
        while (temp < 2 * n and visited[temp]):
            temp += 1
        if (temp >= 2 * n):
            res = [-1]
            break
        visited[temp] = 1
        res.append(i)
        res.append(temp + 1)
    print(*res)




"""
NTC here
""" 
import sys
inp= sys.stdin.readline
input = lambda : inp().strip()
# flush= sys.stdout.flush
# import threading
# sys.setrecursionlimit(10**6)
# threading.stack_size(2**26)

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



def main():
    T = iin()
    while T:
        T-=1
        n = iin()
        a = lin()
        l = 2*n+1
        done = [0]*(l)
        ans = []
        for i in a:
            done[i]=1
        for i in a:
            ans.append(i)
            for j in range(i+1, l):
                if done[j]==0:
                    done[j]=1
                    ans.append(j)
                    break
            else:
                print(-1)
                break
        else:
            print(*ans)



main()

#threading.Thread(target=main).start()



from math import *
from collections import *
t = int(input())
for y in range(t):
	n = int(input())
	a = list(map(int,input().split()))
	ch = [0 for i in range(2*n+1)]
	b = [-1 for i in range(2*n)]
	for i in range(n):
		ch[a[i]] = 1
		b[2*i] = a[i]
	flag = 0
	for i in range(0,2*n,2):
		m = -1
		for j in range(b[i],2*n+1):
			if(ch[j] == 0):
				ch[j] = 1
				m = j
				break
		if(m == -1):
			flag = -1
			break
		b[i+1] = m
		#print(ch)
	if(flag == -1):
		print(-1)
	else:
		for i in b:
			print(i,end = " ")
		print()

t = int(input())
for i in range(t):
    n = int(input())
    b = list(map(int, input().split()))
    m = [1 for j in range(2 * n)]
    for k in b:
        m[k - 1] = 0
    a = []
    mega_bul = True
    for el in b:
        a.append(el)
        ind = 0
        bul = False
        while ind < 2 * n:
            if ind + 1 > el and m[ind] == 1:
                m[ind] = 0
                a.append(ind + 1)
                bul = True
                break
            ind += 1
        if not bul:
            mega_bul = False
            break
    if mega_bul:
        print(" ".join(map(str, a)))
    else:
        print(-1)


t = int(input())
for _ in range(t):
  n = int(input())
  a = list(map(int,input().split()))
  b = sorted(a)
  used = [0 for i in range(2*n+1)]
  flg = 1
  for i in range(n):
    if b[i] > i*2+1:
      print(-1)
      flg = 0
      break
    used[b[i]] = 1
  if flg == 0:
    continue
  ans = []
  for i in range(n):
    ans.append(a[i])
    for j in range(a[i],2*n+1):
      if used[j] == 0:
        ans.append(j)
        used[j] = 1
        break
  print(*ans)

for _ in range(int(input())):
    n, b = int(input()), list(map(int, input().split()))

    d = {e: True for e in range(1, 2*n + 1)}

    a = [0] * (2 * n)
    for i in range(n):
        a[2*i] = b[i]
        d[b[i]] = False

    ok = True
    for i in range(1, 2*n, 2):
        e = a[i-1] + 1
        while e <= 2*n:
            if d[e]:
                a[i] = e
                d[e] = False
                break
            e += 1

        if e > 2*n:
            ok = False
            break

    if not ok:
        print(-1)
    else:
        print(*a)

from math import *

zzz = int(input())
for zz in range(zzz):
    n = int(input())
    b = [int(i) for i in input().split()]
    a = [0] * (2 * n)
    sl = set([i + 1 for i in range(2*n)])
    ha = True
    for i in range(n):
        a[2*i] = b[i]
        try:
            sl.remove(b[i])
        except:
            ha = False
            break
    if ha:
        sl = list(sl)
        sl.sort()
        for i in range(n):
            j = 0
            while j < len(sl) and sl[j] < b[i]:
                j += 1
            if j == len(sl):
                ha = False
                break
            else:
                a[2*i + 1] = sl.pop(j)

    if ha:
        print(' '.join(map(str, a)))
    else:
        print(-1)
    


for i in range(int(input())):
    n = int(input())
    s = list(map(int, input().split()))
    elems = [0 for i in range(2 * n + 1)]
    ans = []
    for i in range(len(s)):
        elems[s[i]] = 1
    for i in range(len(s)):
        ans.append(s[i])
        ch = s[i] + 1
        while ch <= 2 * n and elems[ch] != 0:
            ch += 1
        if ch > 2 * n:
            ans = -1
            break
        else:
            elems[ch] = 1
            ans.append(ch)
    if ans == -1:
        print(-1)
    else:
        print(*ans)