There are n chef's in Chefland. There is a festival in Chefland in which each chef is asked to vote a person as his best friend. Obviously, a person can't vote himself as his best friend.  Note that the best friend relationship is not necessarily bi-directional, i.e. it might be possible that x is best friend of y, but y is not a best friend of x.

Devu was the election commissioner who conducted this voting. Unfortunately, he was sleeping during the voting time. So, he could not see the actual vote of each person, instead after the voting, he counted the number of votes of each person and found that number of votes of i-th person was equal to ci. 

Now he is wondering whether this distribution of votes corresponds to some actual voting or some fraudulent voting has happened. If the current distribution of votes does not correspond to any real voting, print -1. Otherwise, print any one of the possible voting which might have lead to the current distribution. If there are more than one possible ways of voting leading to the current distribution, you can print any one of them.

-----Input-----
- First line of the input contains a single integer T denoting number of test cases.
- First line of each test case, contains a single integer n.
- Second line of each test case, contains n space separated integers denoting array c.

-----Output-----
For each test case,

- If there is no real voting corresponding to given distribution of votes, print -1 in a single line.
- Otherwise, print n space separated integers denoting a possible voting leading to current distribution of votes. i-th integer should denote the index of the person (1 based indexing) whom i-th person has voted as his best friend.

-----Constraints and Subtasks-----
- 1 ≤ T ≤ 500
- 1 ≤ n ≤ 50
- 0 ≤ ci ≤ n

-----Example-----
Input:
3
3
1 1 1
3
3 0 0
3
2 2 0

Output:
2 3 1
-1
-1

-----Explanation-----
Example 1: In this example, each person has received one vote. One possible example of real voting leading to this distribution is {2, 3, 1}. In this distribution, number of votes of all three persons are equal to 1. Also it is real voting because no person votes himself as his best friend. 

You can also output another possible distribution {3, 1, 2} too.

Example 2: There is no real voting  corresponding to this voting distribution.

Example 3: There is no real voting  corresponding to this voting distribution.

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) != n or max(l) == n:
		print('-1')
	else:
		d = dict()
		ans = [-1] * n
		for i in range(0, n):
			d[i] = 1
		for i in range(n):
			if l[i] != 0:
				count = l[i]
				for (k, v) in list(d.items()):
					if count > 0 and v == 1 and (i != k):
						d[k] = 0
						ans[k] = i + 1
						count -= 1
		ind = -1
		for i in range(0, len(ans)):
			if ans[i] == -1:
				ind = i
		if ind == -1:
			print(*ans)
		else:
			for i in range(len(ans)):
				if ans[i] != ind + 1:
					ans[ind] = ans[i]
					ans[i] = ind + 1
					break
			print(*ans)


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) != n or max(l) == n:
		print('-1')
	else:
		ans = []
		for i in range(n):
			for j in range(l[i]):
				ans.append(i + 1)
		for i in range(len(ans)):
			if ans[i] == i + 1:
				for j in range(len(ans)):
					if ans[j] != i + 1:
						(ans[i], ans[j]) = (ans[j], ans[i])
						break
		print(*ans)


for _ in range(int(input())):
	n = int(input())
	c = [int(i) for i in input().split()]
	if n == 1:
		print(-1)
		continue
	if sum(c) != n or n in c:
		print(-1)
		continue
	res = []
	for p in range(n):
		for q in range(c[p]):
			res.append(p + 1)
	for p in range(len(res)):
		if res[p] == p + 1:
			for q in range(len(res)):
				if res[q] != p + 1:
					(res[p], res[q]) = (res[q], res[p])
					break
	print(*res)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) != n or max(a) == n:
		print(-1)
		continue
	else:
		rg = []
		for i in range(n):
			if a[i] > 0:
				rg.append([i, a[i]])
		new = [0 for _ in range(n)]
		new[rg[0][0]] = rg[-1][0] + 1
		rg[-1][1] -= 1
		for i in range(1, len(rg)):
			new[rg[i][0]] = rg[i - 1][0] + 1
			rg[i - 1][1] -= 1
		j = 0
		i = 0
		while i <= n - 1:
			if new[i] == 0:
				if rg[j][1] > 0:
					new[i] = rg[j][0] + 1
					rg[j][1] -= 1
					i += 1
				else:
					j += 1
				if rg[j][1] == 0:
					j += 1
			else:
				i += 1
		print(*new)