Chef likes to play with big numbers. Today, he has a big positive integer N. He can select any two digits from this number (the digits can be same but their positions should be different) and orders them in any one of the two possible ways. For each of these ways, he creates a two digit number from it (might contain leading zeros). Then, he will pick a character corresponding to the ASCII value equal to this number, i.e. the number 65 corresponds to 'A', 66 to 'B' and so on till 90 for 'Z'. Chef is only interested in finding which of the characters in the range 'A' to 'Z' can possibly be picked this way. 

-----Input-----
The first line of the input contains an integer T denoting the number of test cases.
The first line of the input contains an integer N. 

-----Output-----
For each test case, output a string containing characters Chef can pick in sorted order If the resulting size of string is zero, you should output a new line.

-----Constraints-----
- 1 ≤ T ≤ 10
- 1 ≤ N ≤ 10100000

-----Subtasks-----
- Subtask #1 (40 points) N ≤ 1010
- Subtask #2 (60 points) Original Constraints

-----Example-----
Input:
4
65
566
11
1623455078

Output:
A
AB

ACDFGHIJKLNPQRSTUVW

-----Explanation-----
Example case 1. Chef can pick digits 6 and 5 and create integers 56 and 65. The integer 65 corresponds to 'A'.
Example case 2. Chef can pick digits 6 and 5 and create 'A' as it equals 65. He can pick 6 and 6 (they are picked from position 2 and position 3, respectively) to create 'B' too. Hence answer is "AB".
Example case 3. It's not possible to create any character from 'A' to 'Z'. Hence, we just print a new line.

Difficulty: MEDIUM

Solutions:
for _ in range(int(input())):
	n = list(map(int, input().strip()))
	arr = [0] * 10
	for i in n:
		arr[i] += 1
	q = 0
	r = 0
	ptr = 0
	for i in range(65, 91):
		q = i // 10
		r = i % 10
		if q != r:
			if arr[q] >= 1 and arr[r] >= 1:
				print(chr(i), end='')
				ptr = 1
		elif arr[q] >= 2:
			print(chr(i), end='')
			ptr = 1
	if ptr == 1:
		print()


for i in range(int(input())):
	n = input()
	final = ''
	for i in range(65, 91):
		x = str(i)
		a = x[0]
		b = x[1]
		if a == b and n.count(a) >= 2:
			final += chr(i)
		elif a != b and a in n and (b in n):
			final += chr(i)
	if len(final) >= 1:
		print(final.upper())


for _ in range(int(input())):
	n = input()
	a = ''
	for i in range(65, 91):
		num = str(i)
		x = num[0]
		y = num[1]
		if x == y and n.count(x) >= 2:
			a += chr(i)
		elif x != y and x in n and (y in n):
			a += chr(i)
	if len(a) >= 1:
		print(a.upper())


t = int(input())
for _ in range(t):
	s = input()
	c = 0
	dic = {}
	for i in s:
		if i in dic:
			dic[i] = dic[i] + 1
		else:
			dic[i] = 1
	for i in range(65, 91, 1):
		s1 = str(i)
		if s1[0] in dic and s1[1] in dic:
			if s1[0] == s1[1]:
				if dic[s1[1]] > 1:
					print(chr(i), end='')
					c = 1
			else:
				print(chr(i), end='')
				c = 1
	if c == 1:
		print()


listInput = lambda : list(map(int, input().split(' ')))
mapInput = lambda : map(int, input().split(' '))
for _ in range(int(input())):
	n = input()
	L = []
	for i in range(65, 91):
		num = str(i)
		(n1, n2) = (num[0], num[1])
		if n1 == n2 and n.count(n1) >= 2:
			L.append(chr(i))
		elif n1 != n2 and n1 in n and (n2 in n):
			L.append(chr(i))
	if len(L) >= 1:
		print(''.join(L))


for _ in range(int(input())):
	a = input()
	b = []
	t = list(range(0, 10))
	for i in t:
		C = 0
		for j in a:
			if i == int(j):
				C += 1
				if C == 2:
					break
		if C == 1:
			b.append(i)
		elif C == 2:
			b.append(i)
			b.append(i)
	l2 = []
	l = len(b)
	for i in range(0, l):
		if b[i] > 5:
			for j in range(0, l):
				if b[i] == 6 and b[j] < 5 or i == j or (b[i] == 9 and b[j] > 0):
					continue
				c = 10 * b[i] + b[j]
				l2.append(chr(c))
	l2 = sorted(set(l2))
	if len(l2) == 0:
		continue
	for i in l2:
		print(i, end='')
	print('')


tests = int(input())
for i in range(tests):
	num = input()
	unique_dict = {}
	for j in num:
		if j in unique_dict:
			unique_dict[j] += 1
		else:
			unique_dict[j] = 1
	ans = ''
	for j in range(65, 91):
		ascii_j = str(j)
		flag = True
		for k in ascii_j:
			if k not in unique_dict or ascii_j.count(k) > unique_dict[k]:
				flag = False
				break
		if flag:
			ans += chr(j)
	if ans:
		print(ans)


for _ in range(int(input())):
	s = input()
	cnt = [0] * 10
	for i in s:
		cnt[ord(i) - 48] += 1
	answer = -1
	result = ''
	for i in range(65, 91):
		(a, b) = (i // 10, i % 10)
		answer += 1
		if a == b:
			if cnt[a] < 2:
				continue
			result = result + chr(65 + answer)
		elif cnt[a] >= 1 and cnt[b] >= 1:
			result = result + chr(65 + answer)
	if len(result) == 0:
		pass
	else:
		print(result)


tests = int(input())
for i in range(tests):
	num = input()
	ans = ''
	for j in range(65, 91):
		ascii_j = str(j)
		if ascii_j[0] == ascii_j[1] and num.count(ascii_j[0]) >= 2:
			ans += chr(j)
		elif ascii_j[0] != ascii_j[1] and num.count(ascii_j[0]) >= 1 and (num.count(ascii_j[1]) >= 1):
			ans += chr(j)
	if ans:
		print(ans)