Vishal Wants to buy 2 gifts for his best friend whose name is Annabelle(her age is 20), So they both went for shopping in a store. But Annabelle gave, Vishal a condition that she will accept this gifts only when the total price of the gifts is the same as her age times 100.
The store contains, a list of items whose prices are also displayed, Now Vishal is asking for your help to buy gifts, as he wants to impress Annabelle this time.
Note: Vishal cannot buy the same item more than once.

-----Input:-----
- The first line of the input contains a single integer $T$. $T$ denoting the number of test cases. The description of $T$ test cases is as follows.
- The next line of the input contains a single integer $N$. $N$ denotes the total number of items in store.
- The next line of the input contains $N$ space-separated integers $A1, A2, A3...An$ where $ith$ number denotes the price of $ith$ element.

-----Output:-----
- For each test-case print "Accepted"(without quotes) if the gifts are accepted by Annabelle, else print "Rejected"(without quotes)

-----Constraints:-----
- $1 \leq T \leq 10^3$
- $1 \leq N \leq 10^5$
- $1 \leq A1, A2, A3...An \leq 10^7$

-----Sample Input:-----
1
5
10 2 1000 50 1000

-----Sample Output:-----
Accepted

-----Explanation:-----
- As the given list of items have 2 items whose price sum up to the age times 100 of Annabelle i.e. 1000+1000 = (20 *100)

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
test = int(input())
ANS = list()
for i in range(test):
	n = int(input())
	items = sorted(list(map(int, input().split())))
	c = 1
	for j in range(len(items)):
		if items[j] < 2000:
			t = 2000 - items[j]
			if t in items[j + 1:]:
				ANS.append('Accepted')
				c = 2
				break
			else:
				pass
		else:
			break
	if c == 1:
		ANS.append('Rejected')
for ans in ANS:
	print(ans)


from sys import stdin, stdout
from itertools import combinations
input = stdin.readline
print2 = stdout.write

def sub_lists(my_list, le):
	for x in combinations(my_list, 2):
		if sum(x) == 2000:
			return 'Accepted'
	return 'Rejected'
for _ in range(int(input())):
	n = int(input())
	if n == 1:
		input()
		print('Rejected')
		continue
	elif n == 2:
		if sum(map(int, stdin.readline().split())) != 2000:
			print('Rejected')
		else:
			print('Accepted')
		continue
	a = sorted(list(map(int, stdin.readline().split())))
	i = n - 1
	while i >= 0 and a[i] > 2000:
		i -= 1
	if i <= 0:
		print('Rejected')
		continue
	i += 1
	if sum(a[:i]) < 2000:
		print('Rejected')
		continue
	print(sub_lists(a[:i], i))


ncases = int(input())
for cases in range(ncases):
	items = int(input())
	pricelist = list(map(int, input().split()))
	intended = 2000
	if pricelist.count(1000) >= 2:
		print('Accepted')
		continue
	accepted = False
	for i in pricelist:
		if i != 1000 and intended - i in pricelist:
			accepted = True
	if accepted:
		print('Accepted')
	else:
		print('Rejected')


def getPairsCount(arr, n, sum):
	m = [0] * 10000001
	for i in range(0, n):
		m[arr[i]] += 1
	twice_count = 0
	for i in range(0, n):
		twice_count += m[sum - arr[i]]
		if sum - arr[i] == arr[i]:
			twice_count -= 1
	return int(twice_count / 2)
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	su = 2000
	val = getPairsCount(l, n, su)
	if val:
		print('Accepted')
	else:
		print('Rejected')


t = int(input())
for i in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	flag = 0
	lst.sort()
	for j in range(len(lst)):
		for k in range(j + 1, len(lst)):
			if lst[j] + lst[k] == 2000:
				print('Accepted')
				flag = 1
				break
		if flag == 1:
			break
	if flag == 0:
		print('Rejected')


for _ in range(int(input())):
	n = int(input())
	t = False
	arr = list(map(int, input().split()))
	if arr.count(1000) == 2:
		print('Accepted')
		continue
	s = set(arr)
	for i in s:
		if i < 1000 and 2000 - i in s:
			t = True
			break
	print('Accepted' if t else 'Rejected')


for t in range(int(input())):
	n = int(input())
	A = [int(i) for i in input().split()]
	A.sort()
	X = 2000
	i = 0
	j = n - 1
	ans = 0
	while i < j:
		if A[i] + A[j] == X:
			ans = 1
			break
		elif A[i] + A[j] < X:
			i += 1
		else:
			j -= 1
	if ans == 1:
		print('Accepted')
	else:
		print('Rejected')


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	arr = list(map(int, stdin.readline().split()))
	d = {}
	for ele in arr:
		d[ele] = d.get(ele, 0) + 1
	cond = False
	for ele in d:
		if ele == 1000:
			if d[ele] >= 2:
				cond = True
				break
		elif 2000 - ele in d:
			cond = True
			break
	if cond == True:
		print('Accepted')
	else:
		print('Rejected')


target = 2000

def finds(nums, target):
	tmp_map = {}
	for (index, num) in enumerate(nums):
		if target - num in tmp_map:
			return [index, tmp_map[target - num]]
		tmp_map[num] = index
for i in range(int(input())):
	n = int(input())
	nums = list(map(int, input().split()))
	if finds(nums, target) == None:
		print('Rejected')
	else:
		print('Accepted')


t = int(input())
for k in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	i = 0
	j = n - 1
	l.sort()
	while i < j:
		val = l[i] + l[j]
		if val == 2000:
			print('Accepted')
			break
		elif val < 2000:
			i += 1
		else:
			j -= 1
	if i >= j:
		print('Rejected')


t = int(input())
for _ in range(t):
	n = int(input())
	array = list(map(int, input().split()))
	array.sort()
	idx = n - 1
	flag = 0
	for i in range(n):
		if i == idx:
			break
		while idx > i + 1 and array[i] + array[idx] > 2000:
			idx -= 1
		if array[i] + array[idx] == 2000:
			flag = 1
			break
	if flag == 1:
		print('Accepted')
	else:
		print('Rejected')


for _ in range(int(input())):
	n = int(input())
	flag = 0
	a = list(map(int, input().split()))
	a.sort()
	for i in range(n):
		for j in range(i + 1, n):
			if 2000 - a[i] == a[j]:
				flag = 1
				break
		if flag == 1:
			break
	if flag == 1:
		print('Accepted')
	else:
		print('Rejected')


def func(a):
	a.sort()
	i = 0
	j = len(a) - 1
	while i < j:
		if a[i] + a[j] == 2000:
			return 'Accepted'
		elif a[i] + a[j] > 2000:
			j -= 1
		else:
			i += 1
	return 'Rejected'
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	print(func(a))


for _ in range(int(input())):
	n = int(input())
	arr = sorted(map(int, input().split()))
	(l, r) = (0, n - 1)
	ans = 'Rejected'
	while l < r:
		k = arr[l] + arr[r]
		if k == 2000:
			ans = 'Accepted'
			break
		elif k > 2000:
			r -= 1
		else:
			l += 1
	print(ans)


def main():
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		flag = False
		s = set(a)
		if a.count(1000) >= 2:
			flag = True
		for i in a:
			if 2000 - i in s and i != 1000:
				flag = True
				break
		print('Accepted' if flag else 'Rejected')
main()


t = int(input())
while t > 0:
	N = int(input())
	dress_price = list(map(int, input().split()))
	flag = 0
	dress_price.sort(reverse=True)
	for i in range(N):
		if dress_price[i] < 2000:
			k1 = 2000 - dress_price[i]
			if k1 in dress_price[i + 1:]:
				flag = 1
				break
	if flag == 1:
		print('Accepted')
	else:
		print('Rejected')
	t = t - 1


def check(arr, n):
	s = set()
	for i in range(0, n):
		temp = 2000 - arr[i]
		if temp in s:
			return 'Accepted'
		s.add(arr[i])
	return 'Rejected'
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	print(check(arr, n))