During their New Year holidays, Alice and Bob play the following game using an array $a$ of $n$ integers:

Players take turns, Alice moves first.

Each turn a player chooses any element and removes it from the array.

If Alice chooses even value, then she adds it to her score. If the chosen value is odd, Alice's score does not change.

Similarly, if Bob chooses odd value, then he adds it to his score. If the chosen value is even, then Bob's score does not change.

If there are no numbers left in the array, then the game ends. The player with the highest score wins. If the scores of the players are equal, then a draw is declared.

For example, if $n = 4$ and $a = [5, 2, 7, 3]$, then the game could go as follows (there are other options):

On the first move, Alice chooses $2$ and get two points. Her score is now $2$. The array $a$ is now $[5, 7, 3]$.

On the second move, Bob chooses $5$ and get five points. His score is now $5$. The array $a$ is now $[7, 3]$.

On the third move, Alice chooses $7$ and get no points. Her score is now $2$. The array $a$ is now $[3]$.

On the last move, Bob chooses $3$ and get three points. His score is now $8$. The array $a$ is empty now.

Since Bob has more points at the end of the game, he is the winner.

You want to find out who will win if both players play optimally. Note that there may be duplicate numbers in the array.


-----Input-----

The first line contains an integer $t$ ($1 \le t \le 10^4$) — the number of test cases. Then $t$ test cases follow.

The first line of each test case contains an integer $n$ ($1 \le n \le 2 \cdot 10^5$) — the number of elements in the array $a$.

The next line contains $n$ integers $a_1, a_2, \ldots, a_n$ ($1 \le a_i \le 10^9$) — the array $a$ used to play the game.

It is guaranteed that the sum of $n$ over all test cases does not exceed $2 \cdot 10^5$.


-----Output-----

For each test case, output on a separate line:

"Alice" if Alice wins with the optimal play;

"Bob" if Bob wins with the optimal play;

"Tie", if a tie is declared during the optimal play.


-----Examples-----

Input
4
4
5 2 7 3
3
3 2 1
4
2 2 2 2
2
7 8
Output
Bob
Tie
Alice
Alice


-----Note-----

None

Difficulty: EASY

Solutions:
t = int(input())
while t:
	t -= 1
	n = int(input())
	arr = map(int, input().split())
	arr = sorted(arr)
	alice = 0
	bob = 0
	alicekord = 1
	ctr = n - 1
	while ctr >= 0:
		if arr[ctr] % 2:
			if not alicekord:
				bob += arr[ctr]
		elif arr[ctr] % 2 == 0:
			if alicekord:
				alice += arr[ctr]
		alicekord = (alicekord + 1) % 2
		ctr -= 1
	if bob < alice:
		print('Alice')
	elif alice < bob:
		print('Bob')
	else:
		print('Tie')


for _ in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())), reverse=True)
	Alice = sum([i if i % 2 == 0 else 0 for i in a[::2]])
	Bob = sum([i if i % 2 == 1 else 0 for i in a[1::2]])
	if Alice > Bob:
		print('Alice')
	elif Alice < Bob:
		print('Bob')
	else:
		print('Tie')


list_ans = []
for _ in range(int(input())):
	n = int(input())
	list1 = list(map(int, input().split()))
	(a, b) = (0, 0)
	(a1, b1) = (0, 0)
	list1.sort()
	while list1:
		a1 = list1.pop()
		if a1 % 2 == 0:
			a += a1
		if list1:
			b1 = list1.pop()
			if b1 % 2 == 1:
				b += b1
	if a > b:
		list_ans.append('Alice')
	elif a < b:
		list_ans.append('Bob')
	else:
		list_ans.append('Tie')
for item in list_ans:
	print(item)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	alice = 0
	bob = 0
	turn = True
	while len(a) > 0:
		if turn:
			num = a.pop()
			if num % 2 == 0:
				alice += num
			turn = False
		else:
			num = a.pop()
			if num % 2 == 1:
				bob += num
			turn = True
	if alice > bob:
		print('Alice')
	elif bob > alice:
		print('Bob')
	else:
		print('Tie')


def chet(num):
	if num % 2 == 0:
		return True
	else:
		return False

def func():
	n = int(input())
	a = list(map(int, input().split()))
	a_s = sorted(a)[::-1]
	alice_count = 0
	for (nn, i) in enumerate(a_s):
		if chet(nn):
			if chet(i):
				alice_count += i
		elif chet(i) == False:
			alice_count -= i
	if alice_count > 0:
		print('Alice')
	elif alice_count < 0:
		print('Bob')
	else:
		print('Tie')
t = int(input())
for _ in range(t):
	func()


def update_even():
	global highest_even
	while (a[highest_even] % 2 == 1 or taken[highest_even]) and highest_even >= 0:
		highest_even -= 1

def update_odd():
	global highest_odd
	while (a[highest_odd] % 2 == 0 or taken[highest_odd]) and highest_odd >= 0:
		highest_odd -= 1
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	taken = [False] * n
	a.sort()
	alice = 0
	bob = 0
	highest_odd = -1
	highest_even = -1
	for i in range(n - 1, -1, -1):
		if a[i] % 2 == 1:
			highest_odd = i
			break
	for i in range(n - 1, -1, -1):
		if a[i] % 2 == 0:
			highest_even = i
			break
	turn = False
	for _ in range(n):
		if turn == 0:
			if highest_even == -1:
				taken[highest_odd] = True
				update_odd()
			elif highest_odd == -1:
				taken[highest_even] = True
				alice += a[highest_even]
				update_even()
			elif a[highest_even] >= a[highest_odd]:
				taken[highest_even] = True
				alice += a[highest_even]
				update_even()
			else:
				taken[highest_odd] = True
				update_odd()
		elif highest_odd == -1:
			taken[highest_even] = True
			update_even()
		elif highest_even == -1:
			taken[highest_odd] = True
			bob += a[highest_odd]
			update_odd()
		elif a[highest_odd] >= a[highest_even]:
			taken[highest_odd] = True
			bob += a[highest_odd]
			update_odd()
		else:
			taken[highest_even] = True
			update_even()
		turn ^= True
	if alice > bob:
		print('Alice')
	elif alice < bob:
		print('Bob')
	else:
		print('Tie')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	a1 = 0
	b = 0
	for i in range(0, n, 2):
		if a[i] % 2 == 0:
			a1 += a[i]
		if i + 1 == n:
			break
		if a[i + 1] % 2 == 1:
			b += a[i + 1]
	if a1 > b:
		print('Alice')
	elif a1 < b:
		print('Bob')
	else:
		print('Tie')


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().replace('\n', '').split(' ')]
	Alice = [0]
	Bob = [0]
	for i in a:
		if i % 2 == 0:
			Alice.append(i)
		else:
			Bob.append(i)
	Alice.sort(reverse=True)
	Bob.sort(reverse=True)
	aa = 0
	bb = 0
	ai = 0
	bi = 0
	while n > 0:
		if Alice[ai] >= Bob[bi]:
			aa += Alice[ai]
			ai += 1
		else:
			bi += 1
		n -= 1
		if n == 0:
			break
		if Alice[ai] <= Bob[bi]:
			bb += Bob[bi]
			bi += 1
		else:
			ai += 1
		n -= 1
	if aa > bb:
		print('Alice')
	elif bb > aa:
		print('Bob')
	elif aa == bb:
		print('Tie')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	ans = 0
	for i in range(n):
		if i % 2 == 0:
			if arr[i] % 2 == 0:
				ans += arr[i]
		elif arr[i] % 2 == 1:
			ans -= arr[i]
	if ans == 0:
		print('Tie')
	elif ans > 0:
		print('Alice')
	else:
		print('Bob')


import sys
input = sys.stdin.buffer.readline

def multiLineArrayPrint(arr):
	print('\n'.join([str(x) for x in arr]))
t = int(input())
allAns = []
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	score = 0
	aliceNext = True
	for i in range(n - 1, -1, -1):
		if aliceNext and a[i] % 2 == 0:
			score += a[i]
		elif not aliceNext and a[i] % 2 == 1:
			score -= a[i]
		aliceNext = not aliceNext
	if score > 0:
		allAns.append('Alice')
	elif score == 0:
		allAns.append('Tie')
	else:
		allAns.append('Bob')
multiLineArrayPrint(allAns)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	even = []
	odd = []
	for x in a:
		if x % 2 == 0:
			even.append(x)
		else:
			odd.append(x)
	even.sort()
	odd.sort()
	alice = 0
	bob = 0
	for i in range(n):
		if i % 2 == 0:
			if len(even) > 0 and len(odd) > 0 and (even[-1] >= odd[-1]):
				alice += even[-1]
				even.pop()
			elif len(odd) == 0:
				alice += even[-1]
				even.pop()
			else:
				odd.pop()
		elif len(odd) > 0 and len(even) > 0 and (odd[-1] >= even[-1]):
			bob += odd[-1]
			odd.pop()
		elif len(even) == 0:
			bob += odd[-1]
			odd.pop()
		else:
			even.pop()
	if alice > bob:
		print('Alice')
	elif bob > alice:
		print('Bob')
	else:
		print('Tie')


import math
from time import time
from collections import Counter, deque

def main():
	n = int(input())
	K = list(map(int, input().split()))
	A = deque(sorted(K, reverse=True))
	s1 = 0
	s2 = 0
	t = 1
	while len(A) != 0:
		if t == 1:
			if A[0] % 2 == 0:
				s1 += A[0]
		elif A[0] % 2 == 1:
			s2 += A[0]
		A.popleft()
		if t == 1:
			t = 2
		else:
			t = 1
	if s1 == s2:
		print('Tie')
	elif s1 > s2:
		print('Alice')
	else:
		print('Bob')
for i in range(int(input())):
	main()


for _ in range(int(input())):
	(n_rounds, score) = (int(input()), 0)
	vals = sorted(map(int, input().split()), reverse=True)
	for i in range(n_rounds):
		if i % 2 == 0:
			if vals[i] % 2 == 0:
				score += vals[i]
		elif vals[i] % 2 != 0:
			score -= vals[i]
	if score > 0:
		print('Alice')
	elif score < 0:
		print('Bob')
	else:
		print('Tie')


from collections import deque
t = int(input())
for ii in range(t):
	n = int(input())
	a = list(map(int, input().rstrip().split()))
	odd = []
	even = []
	for i in a:
		if i % 2 == 0:
			even.append(i)
		else:
			odd.append(i)
	odd.sort(reverse=True)
	even.sort(reverse=True)
	odd = deque(odd)
	even = deque(even)
	alice = 0
	bob = 0
	chance = 0
	while even and odd:
		if chance == 0:
			if odd[0] > even[0]:
				odd.popleft()
			else:
				alice += even.popleft()
			chance = 1
		else:
			if even[0] > odd[0]:
				even.popleft()
			else:
				bob += odd.popleft()
			chance = 0
	if len(even) > 0:
		if chance == 0:
			for i in range(len(even)):
				if i % 2 == 0:
					alice += even[i]
		if chance == 1:
			even.popleft()
			for i in range(len(even)):
				if i % 2 == 0:
					alice += even[i]
	elif len(odd) > 0:
		if chance == 0:
			odd.popleft()
			for i in range(len(odd)):
				if i % 2 == 0:
					bob += odd[i]
		if chance == 1:
			for i in range(len(odd)):
				if i % 2 == 0:
					bob += odd[i]
	if alice > bob:
		print('Alice')
	elif bob > alice:
		print('Bob')
	else:
		print('Tie')


for _ in range(int(input())):
	n = int(input())
	data = list(map(int, input().split()))
	data.sort(reverse=True)
	alice = bob = 0
	for i in range(n):
		if data[i] % 2 and i % 2:
			bob += data[i]
		elif not data[i] % 2 and (not i % 2):
			alice += data[i]
	if alice > bob:
		print('Alice')
	elif bob > alice:
		print('Bob')
	else:
		print('Tie')


def evenOddGame(n, array):
	array.sort(reverse=True)
	allice = 0
	bob = 0
	for x in range(n):
		if x % 2 == 0 and array[x] % 2 == 0:
			allice += array[x]
		elif x % 2 == 1 and array[x] % 2 == 1:
			bob += array[x]
	if allice > bob:
		return 'Alice'
	elif bob > allice:
		return 'Bob'
	else:
		return 'Tie'
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	print(evenOddGame(n, l))


t = int(input())
while t != 0:
	n = int(input())
	A = list(map(int, input().split()))
	score = 0
	A.sort(reverse=True)
	for i in range(n):
		if i % 2 == 0:
			if A[i] % 2 == 0:
				score += A[i]
			else:
				score += 0
		elif A[i] % 2 == 1:
			score -= A[i]
		else:
			score -= 0
	if score > 0:
		print('Alice')
	elif score < 0:
		print('Bob')
	else:
		print('Tie')
	t -= 1


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	w = sorted(map(int, input().split()), reverse=True)
	(A, B) = (0, 0)
	for i in range(0, n - 1, 2):
		if w[i] % 2 and w[i + 1] % 2:
			B += w[i + 1]
		elif w[i] % 2 == 0 and w[i + 1] % 2 == 0:
			A += w[i]
		elif w[i] % 2 == 0 and w[i + 1] % 2:
			A += w[i]
			B += w[i + 1]
	if n % 2 == 1:
		if w[-1] % 2 == 0:
			A += w[-1]
	print('Bob' if B > A else 'Alice' if A > B else 'Tie')


for i in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())), reverse=True)
	i = 0
	(al, bo) = (0, 0)
	while i < n:
		if a[i] % 2 == 0:
			al += a[i]
		i += 1
		if i < n and a[i] % 2 != 0:
			bo += a[i]
		i += 1
	if al > bo:
		print('Alice')
	elif al < bo:
		print('Bob')
	else:
		print('Tie')


t = int(input())
for _ in range(t):
	l = int(input())
	alice_score = 0
	bob_score = 0
	list1 = list(map(int, input().split()))
	list1.sort(reverse=True)
	for i in range(l):
		a = list1[i]
		if i % 2 == 0 and a % 2 == 0:
			alice_score = alice_score + a
		elif i % 2 == 1 and a % 2 == 1:
			bob_score = bob_score + a
	if alice_score == bob_score:
		print('Tie')
	elif alice_score > bob_score:
		print('Alice')
	else:
		print('Bob')


from heapq import heapify, heappop, heappush
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	even = []
	odd = []
	smEven = 0
	smOdd = 0
	for i in a:
		if i % 2 == 0:
			smEven += i
			even.append(i)
		else:
			smOdd += i
			odd.append(i)
	x = 0
	even.sort()
	odd.sort()
	for i in range(n):
		if even and odd:
			xx = even[-1]
			yy = odd[-1]
			mx = max(xx, yy)
			if i % 2 == 0:
				if mx == xx:
					even.pop()
					x += mx
				else:
					odd.pop()
			elif mx == xx:
				even.pop()
			else:
				odd.pop()
				x -= mx
			continue
		if i % 2:
			if not even:
				x -= odd.pop()
			else:
				even.pop()
		elif not odd:
			x += even.pop()
		else:
			odd.pop()
	res = 'Tie'
	if x > 0:
		res = 'Alice'
	elif x < 0:
		res = 'Bob'
	print(res)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = 0
	flag = True
	for i in range(n):
		x = a.pop()
		if flag:
			if x % 2 == 0:
				ans += x
			flag = not flag
		else:
			if x % 2 != 0:
				ans -= x
			flag = not flag
	if ans == 0:
		print('Tie')
	elif ans > 0:
		print('Alice')
	else:
		print('Bob')


import sys

def solve(nums):
	a = b = 0
	nums.sort()
	while nums:
		n = nums.pop()
		a += n if n % 2 == 0 else 0
		if nums:
			n = nums.pop()
			b += n if n % 2 != 0 else 0
	return 'Alice' if a > b else 'Bob' if b > a else 'Tie'
t = int(sys.stdin.readline().rstrip())
for _ in range(t):
	_ = int(sys.stdin.readline().rstrip())
	nums = list(map(int, sys.stdin.readline().rstrip().split(' ')))
	print(solve(nums))


for i in range(int(input())):
	n = int(input())
	arr = sorted(list(map(int, input().split())))
	result = 0
	for i in range(n):
		a = arr.pop()
		if i % 2 == 0:
			if a % 2 == 0:
				result += a
		elif a % 2 != 0:
			result -= a
	if result > 0:
		print('Alice')
	elif result < 0:
		print('Bob')
	else:
		print('Tie')


import math
for t in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	esum = 0
	osum = 0
	for i in range(0, len(l), 2):
		if l[i] % 2 == 0:
			esum += l[i]
		j = i + 1
		if j < len(l):
			if l[j] % 2 != 0:
				osum += l[j]
	if esum == osum:
		print('Tie')
	elif esum > osum:
		print('Alice')
	else:
		print('Bob')


I = lambda : map(int, input().split())
for _ in [0] * int(input()):
	n = int(input())
	a = list(I())
	c = i = 0
	a.sort(reverse=1)
	for x in a:
		if i == 0 and x % 2 == 0:
			c = c + x
		elif i == 1 and x % 2 == 1:
			c = c - x
		i = 1 - i
	if c == 0:
		print('Tie')
	elif c > 0:
		print('Alice')
	else:
		print('Bob')


int_inp = lambda : int(input())
strng = lambda : input().strip()
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))
import math
from collections import Counter, defaultdict
for _ in range(int_inp()):
	k = int_inp()
	m = seq()
	m.sort()
	alice = 0
	bob = 0
	while 1:
		try:
			if m[-1] % 2 == 0:
				alice = alice + m[-1]
			m.pop(-1)
			if m[-1] % 2 != 0:
				bob = bob + m[-1]
			m.pop(-1)
		except:
			break
	print(['Alice', 'Bob', 'Tie'][(bob > alice) + 2 * (bob == alice)])


import sys
input = sys.stdin.readline

def greater(a, b):
	return a > b
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	ans = 0
	for i in range(n):
		if i % 2 == 0:
			if a[i] % 2 == 0:
				ans += a[i]
		elif a[i] % 2 == 1:
			ans -= a[i]
	if ans == 0:
		print('Tie')
	elif ans > 0:
		print('Alice')
	else:
		print('Bob')


for _ in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))[::-1]
	ar = a[::2]
	br = a[1::2]
	sum1 = 0
	sum2 = 0
	for i in range(len(ar)):
		if ar[i] % 2 == 0:
			sum1 += ar[i]
	for i in range(len(br)):
		if br[i] % 2:
			sum2 += br[i]
	if sum1 > sum2:
		print('Alice')
	elif sum1 < sum2:
		print('Bob')
	else:
		print('Tie')


nbtest = int(input())
for i in range(nbtest):
	n = input()
	numbers = [int(i) for i in input().split()]
	alice = 0
	bob = 0
	t = 0
	numbers.sort(reverse=True)
	for c in numbers:
		if c % 2 == 0 and t % 2 == 0:
			alice += c
		if c % 2 == 1 and t % 2 == 1:
			bob += c
		t += 1
	if alice > bob:
		print('Alice')
	elif bob > alice:
		print('Bob')
	else:
		print('Tie')


T = int(input())
for tc in range(T):
	n = int(input())
	array_a = list(map(int, input().split()))
	even = []
	odds = []
	numbers = []
	for i in range(n):
		if array_a[i] % 2 == 0:
			even.append(array_a[i])
		else:
			odds.append(array_a[i])
	even.sort()
	odds.sort()
	len_even = len(even)
	len_odds = n - len_even
	sum_more_even = 0
	sum_more_odds = 0
	flag_more_even = len_even > len_odds
	flag_more_odds = len_even < len_odds
	if flag_more_even:
		sum_more_even = sum(even[len_even - len_odds - 1:])
	elif flag_more_odds:
		sum_more_odds = sum(odds[len_odds - len_even - 1:])
	score_alice = 0
	score_bob = 0
	while len(even) > 0 or len(odds) > 0:
		if len(even) > 0 and len(odds) > 0:
			if even[-1] - odds[-1] > 0:
				score_alice += even[-1]
				even.pop()
				if len(even) > 0:
					if even[-1] - odds[-1] > 0:
						even.pop()
					else:
						score_bob += odds[-1]
						odds.pop()
				else:
					score_bob += odds[-1]
					odds.pop()
			else:
				odds.pop()
				if len(odds) > 0:
					if even[-1] - odds[-1] > 0:
						even.pop()
					else:
						score_bob += odds[-1]
						odds.pop()
				else:
					even.pop()
		elif len(even) > 0:
			score_alice += even[-1]
			even.pop()
			if len(even) > 0:
				even.pop()
			else:
				break
		elif len(odds) > 0:
			odds.pop()
			if len(odds) > 0:
				score_bob += odds[-1]
				odds.pop()
			else:
				break
		else:
			break
	if score_alice > score_bob:
		print('Alice')
	elif score_alice < score_bob:
		print('Bob')
	else:
		print('Tie')


import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	n = int(input())
	A = list(map(int, input().split()))
	EA = []
	EO = []
	for i in range(n):
		if A[i] % 2 == 0:
			EA.append(A[i])
		else:
			EO.append(A[i])
	EA.sort(reverse=True)
	EO.sort(reverse=True)
	n1 = len(EA)
	n2 = len(EO)
	i = 0
	j = 0
	bv = 0
	av = 0
	flag = 0
	while i != n1 and j != n2:
		if EA[i] > EO[j]:
			if flag == 0:
				av = av + EA[i]
			i = i + 1
		else:
			if flag == 1:
				bv = bv + EO[j]
			j = j + 1
		flag = (flag + 1) % 2
	if i == n1:
		while j < n2:
			if flag % 2 != 0:
				bv = bv + EO[j]
			j = j + 1
			flag = (flag + 1) % 2
	elif j == n2:
		while i < n1:
			if flag % 2 == 0:
				av = av + EA[i]
			i = i + 1
			flag = (flag + 1) % 2
	if av > bv:
		print('Alice')
	elif bv > av:
		print('Bob')
	else:
		print('Tie')


t = int(input())
c = []
for i in range(t):
	n = int(input())
	s = list(map(int, input().split()))
	s.sort()
	s = s[::-1]
	a = 0
	b = 0
	h = 0
	for j in s:
		if h == 0:
			a += j * (1 - j % 2)
			h = 1
		else:
			b += j * (j % 2)
			h = 0
	if a > b:
		c.append('Alice')
	elif a == b:
		c.append('Tie')
	else:
		c.append('Bob')
for i in c:
	print(i)


for k in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	lst.sort(reverse=True)
	score = 0
	for (i, item) in enumerate(lst):
		if i % 2 == 0:
			if item & 1:
				pass
			else:
				score += item
		elif item & 1:
			score -= item
	if score > 0:
		print('Alice')
	elif score < 0:
		print('Bob')
	else:
		print('Tie')


import math
from collections import *
from functools import lru_cache
import bisect
from itertools import *
from heapq import *
inf = float('inf')
ninf = -float('inf')
ip = input
alpha = 'abcdefghijklmnopqrstuvwxyz'

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

def ipn():
	return int(input())

def ipf():
	return float(input())

def solve():
	n = ipn()
	a = sorted(ipl(), reverse=True)
	i = 0
	(al, bo) = (0, 0)
	while i < n:
		if a[i] % 2 == 0:
			al += a[i]
		i += 1
		if i < n and a[i] % 2 != 0:
			bo += a[i]
		i += 1
	if al > bo:
		print('Alice')
	elif al < bo:
		print('Bob')
	else:
		print('Tie')
for _ in range(int(input())):
	solve()


t = int(input())
while t > 0:
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	alice = []
	bob = []
	for i in range(len(l)):
		if i % 2 == 0:
			if l[i] % 2 == 0:
				alice.append(l[i])
		elif i % 2 == 1:
			if l[i] % 2 == 1:
				bob.append(l[i])
	if sum(alice) > sum(bob):
		print('Alice')
	elif sum(bob) > sum(alice):
		print('Bob')
	else:
		print('Tie')
	t -= 1


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	A = list(sorted(map(int, input().split())))
	(turn, alice, bob) = (0, 0, 0)
	while A:
		cur = A.pop()
		if turn % 2 == 0:
			if cur % 2 == 0:
				alice += cur
		elif turn % 2 == 1:
			if cur % 2 == 1:
				bob += cur
		turn += 1
	if alice > bob:
		print('Alice')
	elif bob > alice:
		print('Bob')
	else:
		print('Tie')


cases = int(input())
for t in range(cases):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	alice_turn = True
	alice_point = 0
	bob_point = 0
	arr.sort()
	while n > 0:
		selected = arr.pop()
		if alice_turn and selected % 2 == 0:
			alice_point += selected
		elif not alice_turn and selected % 2 == 1:
			bob_point += selected
		alice_turn = not alice_turn
		n -= 1
	if alice_point > bob_point:
		print('Alice')
	elif alice_point < bob_point:
		print('Bob')
	else:
		print('Tie')


def play_game(arr):
	res = 0
	arr.sort(reverse=True)
	for i in range(len(arr)):
		if i % 2 == 0:
			if arr[i] % 2 == 0:
				res += arr[i]
		elif arr[i] % 2 == 1:
			res -= arr[i]
	if res == 0:
		return 'Tie'
	elif res > 0:
		return 'Alice'
	else:
		return 'Bob'

def main():
	n = int(input())
	for i in range(n):
		t = int(input())
		arr = list(map(int, input().split(' ')))
		print(play_game(arr))
main()


def alice(l, m, i, j):
	if l[i] >= m[j]:
		return 1
	return 0

def bob(l, m, i, j):
	if m[j] >= l[i]:
		return 1
	return 0
t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	a = list(filter(lambda x: x % 2 == 0, l))
	b = list(filter(lambda x: x % 2 != 0, l))
	a.sort(reverse=True)
	b.sort(reverse=True)
	c = len(a)
	d = len(b)
	p = 0
	q = 0
	sa = 0
	sb = 0
	x = 1
	y = 0
	while p <= c - 1 or q <= d - 1:
		if x == 1:
			if p <= c - 1 and q <= d - 1:
				if alice(a, b, p, q):
					sa += a[p]
					p += 1
				else:
					q += 1
			elif p > c - 1 and q <= d - 1:
				q += 1
			else:
				sa += a[p]
				p += 1
			x = 0
			y = 1
		if y == 1:
			if p <= c - 1 and q <= d - 1:
				if bob(a, b, p, q):
					sb += b[q]
					q += 1
				else:
					p += 1
			elif p > c - 1 and q <= d - 1:
				sb += b[q]
				q += 1
			else:
				p += 1
			x = 1
			y = 0
	if sa > sb:
		print('Alice')
	elif sa < sb:
		print('Bob')
	else:
		print('Tie')


import os
from heapq import heapify, heappop, heappush
import sys
import sys, threading
import math
import operator
import bisect
from collections import defaultdict
from io import BytesIO, IOBase
sys.setrecursionlimit(10 ** 5)

def inpt():
	return [int(k) for k in input().split()]

def main():
	for _ in range(int(input())):
		n = int(input())
		ar = inpt()
		odd = []
		even = []
		for i in ar:
			if i & 1:
				odd.append(i)
			else:
				even.append(i)
		odd.sort(reverse=True)
		even.sort(reverse=True)
		turn = 1
		(alice, bob) = (0, 0)
		(i, j) = (0, 0)
		while i < len(odd) and j < len(even):
			if turn:
				if odd[i] > even[j]:
					i += 1
				else:
					alice += even[j]
					j += 1
			elif odd[i] < even[j]:
				j += 1
			else:
				bob += odd[i]
				i += 1
			turn ^= 1
		while i < len(odd):
			if not turn:
				bob += odd[i]
			i += 1
			turn ^= 1
		while j < len(even):
			if turn:
				alice += even[j]
			j += 1
			turn ^= 1
		if alice > bob:
			print('Alice')
		elif bob > alice:
			print('Bob')
		else:
			print('Tie')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


for _ in range(int(input())):
	input()
	n = [int(i) for i in input().split()]
	n.sort()
	(b, a) = (0, 0)
	hod = True
	while n:
		if hod and n[-1] % 2 == 0:
			a += n[-1]
		elif not hod and n[-1] % 2 == 1:
			b += n[-1]
		n.pop(-1)
		hod = not hod
	if a > b:
		print('Alice')
	elif a < b:
		print('Bob')
	elif a == b:
		print('Tie')


for i in range(int(input())):
	b = int(input())
	c1 = c2 = 0
	(*a,) = map(int, input().split())
	a.sort(reverse=True)
	for j in range(b):
		if j % 2 == 0:
			c1 = c1 + a[j] if a[j] % 2 == 0 else c1 + 0
		else:
			c2 = c2 + a[j] if a[j] % 2 != 0 else c2 + 0
	print('Alice' if c1 > c2 else 'Bob' if c1 < c2 else 'Tie')


def solution(n, l):
	l.sort(reverse=True)
	score_A = 0
	score_B = 0
	score_A = sum([elem for elem in l[0::2] if elem % 2 == 0])
	score_B = sum([elem for elem in l[1::2] if elem % 2 == 1])
	if score_A > score_B:
		print('Alice')
	elif score_B > score_A:
		print('Bob')
	else:
		print('Tie')
T = int(input())
for t in range(1, T + 1):
	n = int(input())
	l = list(map(int, input().split()))
	solution(n, l)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	alice_score = 0
	bob_score = 0
	alice_arr = []
	bob_arr = []
	for i in l:
		if i % 2:
			bob_arr.append(i)
		else:
			alice_arr.append(i)
	bob_arr.sort(reverse=True)
	alice_arr.sort(reverse=True)
	i = 0
	j = 0
	turn = 0
	while i < len(alice_arr) or j < len(bob_arr):
		if not turn:
			if i < len(alice_arr) and (j >= len(bob_arr) or alice_arr[i] > bob_arr[j]):
				alice_score += alice_arr[i]
				i += 1
			else:
				j += 1
		elif j < len(bob_arr) and (i >= len(alice_arr) or alice_arr[i] < bob_arr[j]):
			bob_score += bob_arr[j]
			j += 1
		else:
			i += 1
		turn ^= 1
	if alice_score > bob_score:
		print('Alice')
	elif alice_score == bob_score:
		print('Tie')
	else:
		print('Bob')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split(' ')]
	alica = 0
	bob = 0
	a.sort()
	a.reverse()
	for i in range(n):
		if a[i] % 2 == 0 and i % 2 == 0:
			alica += a[i]
		if a[i] % 2 == 1 and i % 2 == 1:
			bob += a[i]
	if alica == bob:
		print('Tie')
	if alica < bob:
		print('Bob')
	if alica > bob:
		print('Alice')


import bisect
for t in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())), reverse=True)
	ans = 0
	for i in range(n):
		if i % 2 == 0:
			if a[i] % 2 == 0:
				ans += a[i]
		elif a[i] % 2 == 1:
			ans -= a[i]
	if ans > 0:
		print('Alice')
	elif ans < 0:
		print('Bob')
	else:
		print('Tie')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	s = 0
	m = 0
	for i in range(n):
		if i % 2 == 0:
			if a[i] % 2 == 0:
				s = s + a[i]
		elif a[i] % 2 != 0:
			m = m + a[i]
	if s == m:
		print('Tie')
	elif s > m:
		print('Alice')
	else:
		print('Bob')


for i in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))[::-1]
	x = sum([i for i in a[::2] if not i % 2])
	y = sum([i for i in a[1::2] if i % 2])
	if x > y:
		print('Alice')
	elif x < y:
		print('Bob')
	else:
		print('Tie')


import math

def getint():
	return [int(i) for i in input().split()]

def getstr():
	return [str(i) for i in input().split()]

def solve():
	n = int(input())
	a = getint()
	a.sort(reverse=True)
	Alice = 0
	Bob = 0
	for i in a[0::2]:
		if i % 2 == 0:
			Alice += i
	for i in a[1::2]:
		if i % 2 == 1:
			Bob += i
	if Alice == Bob:
		print('Tie')
	else:
		print('Alice' if Alice > Bob else 'Bob')
for _ in range(int(input())):
	solve()


import re
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	score = [0, 0]
	for i in range(n):
		if i % 2 == a[i] % 2:
			score[i % 2] += a[i]
	if score[0] > score[1]:
		print('Alice')
	elif score[0] < score[1]:
		print('Bob')
	else:
		print('Tie')


import sys

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def map_string():
	return map(str, sys.stdin.readline().strip().split())

def get_string():
	return sys.stdin.readline().strip()
t = int(get_string())
for _ in range(t):
	n = int(get_string())
	arr = list(get_ints())
	arr = sorted(arr, reverse=True)
	(alice, bob) = (0, 0)
	for i in range(n):
		if i % 2 == 0:
			if arr[i] % 2 == 0:
				alice += arr[i]
		elif arr[i] % 2 != 0:
			bob += arr[i]
	if alice > bob:
		print('Alice')
	elif bob > alice:
		print('Bob')
	else:
		print('Tie')


import io, os
inp = io.BytesIO(os.read(0, os.fstat(0).st_size)).readlines()
for tc in range(1, int(inp[0]) + 1):
	a = [0, 0]
	for (i, x) in enumerate(sorted(map(int, inp[tc << 1].split()), reverse=True)):
		if i & 1 == x & 1:
			a[i & 1] += x
	if a[0] == a[1]:
		print('Tie')
	elif a[0] > a[1]:
		print('Alice')
	else:
		print('Bob')


for i in range(int(input())):
	k = int(input())
	tec = 0
	spic = sorted(list(map(int, input().split())), reverse=True)
	for j in range(k):
		if j % 2 == 0:
			if spic[j] % 2 == 0:
				tec += spic[j]
		elif spic[j] % 2 != 0:
			tec -= spic[j]
	if tec > 0:
		print('Alice')
	elif tec < 0:
		print('Bob')
	else:
		print('Tie')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	flag = True
	s = 0
	for i in arr:
		if flag and i % 2 == 0:
			s += i
		if not flag and i % 2 != 0:
			s -= i
		flag = not flag
	if s > 0:
		print('Alice')
	elif s == 0:
		print('Tie')
	else:
		print('Bob')


for _ in range(int(input())):
	n = int(input())
	lis = list(map(int, input().split()))
	lis.sort(reverse=True)
	g = 0
	for i in range(n):
		if i % 2 == 0:
			if lis[i] % 2 == 0:
				g += lis[i]
		elif lis[i] % 2 != 0:
			g -= lis[i]
	if g > 0:
		print('Alice')
	elif g < 0:
		print('Bob')
	else:
		print('Tie')


import sys, random, bisect
from collections import deque, defaultdict
from heapq import heapify, heappop, heappush
from math import gcd
mod = int(1000000000.0 + 7)
inf = int(1e+20)
input = lambda : sys.stdin.readline().rstrip()
mi = lambda : map(int, input().split())
li = lambda : list(mi())
ii = lambda : int(input())
py = lambda : print('YES')
pn = lambda : print('NO')
t = ii()
for _ in range(t):
	n = ii()
	arr = li()
	a = b = 0
	for (i, num) in enumerate(sorted(arr, reverse=True)):
		if i % 2 == 0:
			if num % 2 == 0:
				a += num
		elif num % 2 == 1:
			b += num
	if a > b:
		print('Alice')
	elif a < b:
		print('Bob')
	else:
		print('Tie')


from sys import stdin, stdout
import math, bisect
from collections import Counter, deque, defaultdict
L = lambda : list(map(int, stdin.readline().strip().split()))
I = lambda : int(stdin.readline().strip())
S = lambda : stdin.readline().strip()
C = lambda : stdin.readline().strip().split()

def pr(a):
	print(' '.join(list(map(str, a))))

def solve():
	n = I()
	a = L()
	e = []
	o = []
	for i in a:
		if i % 2:
			o += [i]
		else:
			e += [i]
	e.sort()
	o.sort()
	(x, y) = (0, 0)
	for i in range(n):
		if i % 2 == 0:
			if o and e:
				if o[-1] > e[-1]:
					o.pop()
				else:
					x += e[-1]
					e.pop()
			elif e:
				x += e[-1]
				e.pop()
			else:
				o.pop()
		elif e and o:
			if e[-1] > o[-1]:
				e.pop()
			else:
				y += o[-1]
				o.pop()
		elif o:
			y += o[-1]
			o.pop()
		else:
			e.pop()
	if x > y:
		print('Alice')
	elif x == y:
		print('Tie')
	else:
		print('Bob')
for _ in range(I()):
	solve()


import sys
from collections import Counter

def get_ints():
	return list(map(int, sys.stdin.readline().strip().split()))
sys.setrecursionlimit(20000)
T = int(input())
for _ in range(T):
	n = int(input())
	A = get_ints()
	A.sort(reverse=True)
	score = [0, 0]
	for i in range(len(A)):
		if i % 2 == 0 and A[i] % 2 == 0:
			score[0] += A[i]
		if i % 2 == 1 and A[i] % 2 == 1:
			score[1] += A[i]
	if score[0] > score[1]:
		print('Alice')
	elif score[0] < score[1]:
		print('Bob')
	else:
		print('Tie')


import sys
n_games = int(sys.stdin.readline())
for _ in range(n_games):
	num_of_nums = int(sys.stdin.readline())
	nums = [int(s) for s in sys.stdin.readline().split()]
	assert num_of_nums == len(nums)
	nums.sort()
	nums.reverse()
	s = 0
	turn = True
	for play in nums:
		if turn:
			if play % 2 == 0:
				s += play
		elif play % 2 != 0:
			s -= play
		turn = not turn
	if s == 0:
		print('Tie')
	elif s > 0:
		print('Alice')
	else:
		print('Bob')


from sys import stdin, stdout
from collections import *
from math import gcd, floor, ceil

def st():
	return list(stdin.readline().strip())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def inp():
	return int(stdin.readline())

def pr(n):
	return stdout.write(str(n) + '\n')
mod = 1000000007
INF = float('inf')

def solve():
	n = inp()
	l = li()
	l.sort(reverse=True)
	a = l[::2]
	b = l[1::2]
	(x, y) = (0, 0)
	for i in a:
		if i % 2 == 0:
			x += i
	for i in b:
		if i & 1:
			y += i
	if x < y:
		pr('Bob')
		return
	if x > y:
		pr('Alice')
		return
	pr('Tie')
for _ in range(inp()):
	solve()


t = int(input())
for _ in range(0, t):
	n = int(input())
	list1 = [int(num) for num in input().split()]
	list1.sort()
	c1 = 0
	c2 = 0
	k = 1
	for i in range(len(list1) - 1, -1, -1):
		num = list1[i]
		if k == 1:
			if num % 2 == 0:
				c1 += num
			k = -1
		else:
			if num % 2 == 1:
				c2 += num
			k = 1
	if c1 > c2:
		print('Alice')
	elif c2 > c1:
		print('Bob')
	else:
		print('Tie')


import sys
n_tests = int(sys.stdin.readline().strip())
for _ in range(n_tests):
	alice = 0
	bob = 0
	max_index = int(sys.stdin.readline().strip())
	l1 = [int(v) for v in sys.stdin.readline().strip().split(' ')]
	l1.sort()
	i = 1
	while l1:
		v = l1.pop()
		if i % 2 == 0:
			if v % 2 != 0:
				bob += v
		elif v % 2 == 0:
			alice += v
		i += 1
	if alice > bob:
		print('Alice')
	elif bob > alice:
		print('Bob')
	else:
		print('Tie')


import sys
input = sys.stdin.readline
t = int(input())
for k in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	(p, q) = ([], [])
	(x, y) = (0, 0)
	for i in range(n):
		if a[i] % 2 == 0:
			p.append(a[i])
			x += 1
		else:
			q.append(a[i])
			y += 1
	p = sorted(p, reverse=True)
	q = sorted(q, reverse=True)
	(i, j) = (0, 0)
	(r, s) = (0, 0)
	c = 0
	while i < x or j < y:
		if i < x and j < y:
			z = max(p[i], q[j])
		elif i < x:
			z = p[i]
		elif j < y:
			z = q[j]
		if c % 2 == 1:
			if z % 2 == 1:
				s += z
				j += 1
			else:
				i += 1
		elif c % 2 == 0:
			if z % 2 == 0:
				r += z
				i += 1
			else:
				j += 1
		c += 1
	if s > r:
		print('Bob')
	elif r == s:
		print('Tie')
	else:
		print('Alice')


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted(list(map(int, input().split())), reverse=True)
	cnt = 0
	alice = 0
	bob = 0
	for i in a:
		if cnt % 2:
			if i % 2:
				bob += i
		elif i % 2 == 0:
			alice += i
		cnt += 1
	print('Alice') if alice > bob else print('Bob') if alice < bob else print('Tie')


for _ in range(int(input())):
	n = int(input())
	an = list(map(int, input().split()))
	an.sort()
	alice = 0
	bob = 0
	for i in range(n):
		if i % 2 == 0:
			if an[-1] % 2 == 0:
				alice += an[-1]
			an.pop(-1)
		else:
			if an[-1] % 2 == 1:
				bob += an[-1]
			an.pop(-1)
	if alice > bob:
		print('Alice')
	elif alice < bob:
		print('Bob')
	else:
		print('Tie')


def EvenOddGame(n, arr):
	arr.sort(reverse=True)
	ans = 0
	for i in range(0, n):
		if i % 2 == 0:
			if arr[i] % 2 == 0:
				ans += arr[i]
		elif arr[i] % 2 == 1:
			ans -= arr[i]
	if ans == 0:
		return 'Tie'
	elif ans > 0:
		return 'Alice'
	else:
		return 'Bob'
tc = int(input())
for _ in range(0, tc):
	n = int(input())
	arr = [int(i) for i in input().split()][:n]
	print(EvenOddGame(n, arr))


t = int(input())
for case in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	(alice, bob, flag) = (0, 0, 1)
	for i in sorted(a, reverse=True):
		if flag:
			if not i & 1:
				alice += i
			flag = 0
		else:
			if i & 1:
				bob += i
			flag = 1
	if alice > bob:
		print('Alice')
	elif bob > alice:
		print('Bob')
	else:
		print('Tie')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort(reverse=True)
	reza = 0
	rezb = 0
	for i in a:
		if i % 2 == 0:
			reza += i
		else:
			rezb += i
	for i in range(n):
		if i % 2 == 0:
			if a[i] % 2 != 0:
				rezb -= a[i]
		elif a[i] % 2 == 0:
			reza -= a[i]
	if reza > rezb:
		print('Alice')
	elif rezb > reza:
		print('Bob')
	else:
		print('Tie')


t = int(input())
for i in range(t):
	ans = 0
	n = int(input())
	nums = list(map(int, input().split()))
	nums.sort(reverse=True)
	for j in range(0, n, 2):
		if nums[j] % 2 == 0:
			ans += nums[j]
	for j in range(1, n, 2):
		if nums[j] % 2 == 1:
			ans -= nums[j]
	if ans == 0:
		print('Tie')
	elif ans > 0:
		print('Alice')
	else:
		print('Bob')


t = int(input())
for z in range(t):
	n = int(input())
	e = sorted([int(q) for q in input().split()], reverse=True)
	w = 0
	for i in range(n):
		if i % 2 == 0 and e[i] % 2 == 0:
			w += e[i]
		if i % 2 == 1 and e[i] % 2 == 1:
			w -= e[i]
	if w > 0:
		print('Alice')
	elif w < 0:
		print('Bob')
	else:
		print('Tie')


import sys, heapq

def evenOddGame(n, a):
	(even, odd, bob, alice, turn) = ([], [], 0, 0, 1)
	for i in a:
		if i & 1:
			heapq.heappush(odd, -i)
		else:
			heapq.heappush(even, -i)
	for i in range(n):
		if turn:
			if not odd or (even and even[0] <= odd[0]):
				alice -= heapq.heappop(even)
			else:
				heapq.heappop(odd)
		elif not even or (odd and odd[0] <= even[0]):
			bob -= heapq.heappop(odd)
		else:
			heapq.heappop(even)
		turn ^= 1
	if alice > bob:
		return 'Alice'
	elif bob > alice:
		return 'Bob'
	else:
		return 'Tie'

def main():
	for _ in range(int(input())):
		(n, a) = (int(input()), [int(i) for i in input().split()])
		print(evenOddGame(n, a))
main()


t = int(input())
while t != 0:
	n = int(input())
	list1 = list(map(int, input().split()))
	even = []
	odd = []
	for i in range(n):
		if list1[i] % 2 == 0:
			even.append(list1[i])
		else:
			odd.append(list1[i])
	even.sort()
	odd.sort()
	(a, b) = (0, 0)
	while 1:
		if len(even) == len(odd) == 0:
			break
		if len(even) == 0 or len(odd) == 0:
			if len(odd) == 0:
				a += even[-1]
				even.pop()
			elif len(even) == 0:
				odd.pop()
		elif even[-1] >= odd[-1]:
			a += even[-1]
			even.pop()
		else:
			odd.pop()
		if len(even) == len(odd) == 0:
			break
		if len(even) == 0 or len(odd) == 0:
			if len(even) == 0:
				b += odd[-1]
				odd.pop()
			elif len(odd) == 0:
				even.pop()
		elif even[-1] <= odd[-1]:
			b += odd[-1]
			odd.pop()
		else:
			even.pop()
	if a > b:
		print('Alice')
	elif a == b:
		print('Tie')
	else:
		print('Bob')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	a = [*map(int, input().split())]
	al = 0
	b = 0
	a.sort(reverse=True)
	t = 0
	for i in range(n):
		if t == 0:
			if a[i] % 2 == 0:
				al += a[i]
			t ^= 1
		else:
			if a[i] % 2:
				b += a[i]
			t ^= 1
	if al == b:
		print('Tie')
	else:
		print('Alice' if al > b else 'Bob')


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	l = list(map(int, stdin.readline().split()))
	l = sorted(l, reverse=True)
	shan = 0
	i = 0
	for a in l:
		if i & 1:
			if a & 1:
				shan -= a
		elif a % 2 == 0:
			shan += a
		i += 1
	if shan == 0:
		print('Tie')
	elif shan > 0:
		print('Alice')
	else:
		print('Bob')


for _ in range(int(input())):
	n = int(input())
	values = [int(i) for i in input().split()]
	(odd, even) = ([], [])
	for v in values:
		if v % 2 == 0:
			even.append(v)
		else:
			odd.append(v)
	even.sort()
	odd.sort()
	alice = 0
	bob = 0
	turn = 0
	while even or odd:
		if not turn:
			if even and odd and (even[-1] > odd[-1]):
				alice += even.pop()
			elif odd:
				odd.pop()
			elif even:
				alice += even.pop()
			turn = 1
		else:
			if even and odd and (odd[-1] > even[-1]):
				bob += odd.pop()
			elif even:
				even.pop()
			elif odd:
				bob += odd.pop()
			turn = 0
	if alice > bob:
		print('Alice')
	elif bob > alice:
		print('Bob')
	else:
		print('Tie')


import math
import bisect
from collections import defaultdict
from collections import OrderedDict
from itertools import combinations
for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ans = 0
	odd = []
	even = []
	(alice, bob) = (0, 0)
	for i in ar:
		if i % 2 == 0:
			even.append(i)
		else:
			odd.append(i)
	odd.sort(reverse=True)
	even.sort(reverse=True)
	(lo, le) = (len(odd), len(even))
	(l1, l2) = (0, 0)
	i = 0
	while l1 < lo or l2 < le:
		if i % 2 == 0:
			if l1 < lo and l2 < le and (odd[l1] > even[l2]):
				l1 += 1
			elif l1 < lo and l2 < le and (odd[l1] < even[l2]):
				alice += even[l2]
				l2 += 1
			elif l1 >= lo and l2 < le:
				alice += even[l2]
				l2 += 1
			elif l2 >= le and l1 < lo:
				l1 += 1
		elif l1 < lo and l2 < le and (odd[l1] < even[l2]):
			l2 += 1
		elif l1 < lo and l2 < le and (odd[l1] > even[l2]):
			bob += odd[l1]
			l1 += 1
		elif l2 >= le and l1 < lo:
			bob += odd[l1]
			l1 += 1
		elif l1 >= lo and l2 < le:
			l2 += 1
		i += 1
	if alice > bob:
		print('Alice')
	elif bob > alice:
		print('Bob')
	else:
		print('Tie')


def sol():
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	ans = 0
	for i in range(n):
		if i % 2 == 0:
			if a[i] % 2 == 0:
				ans += a[i]
		elif a[i] % 2 != 0:
			ans -= a[i]
	if ans > 0:
		print('Alice')
	elif ans == 0:
		print('Tie')
	elif ans < 0:
		print('Bob')
try:
	for _ in range(int(input())):
		sol()
except:
	pass


def solve():
	N = int(input())
	nums = [int(x) for x in input().split()]
	nums.sort(reverse=True)
	alice = 0
	bob = 0
	for i in range(N):
		if i % 2 == 0:
			if nums[i] % 2 == 0:
				alice += nums[i]
		elif nums[i] % 2 == 1:
			bob += nums[i]
	print('Alice' if alice > bob else 'Bob' if bob > alice else 'Tie')
T = int(input())
for _ in range(T):
	solve()


import math
import sys

def get_ints():
	return map(int, sys.stdin.readline().strip().split())
T = int(input())
for t in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	ans = 0
	for i in range(n):
		if a[i] % 2 == i % 2:
			if i % 2 == 1:
				ans -= a[i]
			else:
				ans += a[i]
	if ans > 0:
		print('Alice')
	elif ans == 0:
		print('Tie')
	else:
		print('Bob')


t = int(input())
for tt in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	ass = 0
	bs = 0
	turn = 1
	for i in a:
		if turn == 1:
			turn = 2
			if i % 2 == 0:
				ass += i
		else:
			turn = 1
			if i % 2 != 0:
				bs += i
	if ass > bs:
		print('Alice')
	elif ass < bs:
		print('Bob')
	else:
		print('Tie')


t = int(input())
while t:
	n = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	asc = 0
	bsc = 0
	for i in range(n):
		if i % 2 == 0 and l[i] % 2 == 0:
			asc += l[i]
		elif i % 2 != 0 and l[i] % 2 != 0:
			bsc += l[i]
		else:
			pass
	if asc > bsc:
		print('Alice')
	elif asc == bsc:
		print('Tie')
	else:
		print('Bob')
	t = t - 1


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	dif = 0
	(l1, l2) = ([i for i in l if i % 2 != 0], [i for i in l if i % 2 == 0])
	(alev, bood, c) = (0, 0, 0)
	while len(l1) > 0 or len(l2) > 0:
		if c % 2 == 0:
			if (len(l1) > 0 and len(l2) > 0) and l1[-1] > l2[-1]:
				l1.pop()
			elif len(l2) == 0:
				l1.pop()
			else:
				alev += l2.pop()
		elif (len(l1) > 0 and len(l2) > 0) and l1[-1] < l2[-1]:
			l2.pop()
		elif len(l1) == 0:
			l2.pop()
		else:
			bood += l1.pop()
		c += 1
	if alev > bood:
		print('Alice')
	elif alev < bood:
		print('Bob')
	else:
		print('Tie')


def scores(arr):
	arr = sorted(arr)[::-1]
	alice = 0
	bob = 0
	for (idx, val) in enumerate(arr):
		if idx % 2 == 0:
			if val % 2 == 0:
				alice += val
		elif val % 2 != 0:
			bob += val
	return (alice, bob)

def main():
	t = int(input())
	for x in range(0, t):
		n = int(input())
		arr = list(map(int, input().split()))
		result = scores(arr)
		if result[0] == result[1]:
			print('Tie')
		elif result[0] > result[1]:
			print('Alice')
		else:
			print('Bob')
main()


for _ in range(int(input())):
	a = int(input())
	b = list(sorted(map(int, input().split())))
	b = b[::-1]
	maxi = 0
	w = 0
	m = 0
	n = 0
	for i in range(a):
		if b[i] % 2 == 0 and i % 2 == 0:
			w += b[i]
		elif i % 2 != 0 and b[i] % 2 != 0:
			m += b[i]
	if w > m:
		print('Alice')
	elif m > w:
		print('Bob')
	else:
		print('Tie')


import os
import sys
from io import BytesIO, IOBase
import heapq as h
import bisect
from types import GeneratorType
BUFSIZE = 8192

class SortedList:

	def __init__(self, iterable=[], _load=200):
		values = sorted(iterable)
		self._len = _len = len(values)
		self._load = _load
		self._lists = _lists = [values[i:i + _load] for i in range(0, _len, _load)]
		self._list_lens = [len(_list) for _list in _lists]
		self._mins = [_list[0] for _list in _lists]
		self._fen_tree = []
		self._rebuild = True

	def _fen_build(self):
		self._fen_tree[:] = self._list_lens
		_fen_tree = self._fen_tree
		for i in range(len(_fen_tree)):
			if i | i + 1 < len(_fen_tree):
				_fen_tree[i | i + 1] += _fen_tree[i]
		self._rebuild = False

	def _fen_update(self, index, value):
		if not self._rebuild:
			_fen_tree = self._fen_tree
			while index < len(_fen_tree):
				_fen_tree[index] += value
				index |= index + 1

	def _fen_query(self, end):
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		x = 0
		while end:
			x += _fen_tree[end - 1]
			end &= end - 1
		return x

	def _fen_findkth(self, k):
		_list_lens = self._list_lens
		if k < _list_lens[0]:
			return (0, k)
		if k >= self._len - _list_lens[-1]:
			return (len(_list_lens) - 1, k + _list_lens[-1] - self._len)
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		idx = -1
		for d in reversed(range(len(_fen_tree).bit_length())):
			right_idx = idx + (1 << d)
			if right_idx < len(_fen_tree) and k >= _fen_tree[right_idx]:
				idx = right_idx
				k -= _fen_tree[idx]
		return (idx + 1, k)

	def _delete(self, pos, idx):
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len -= 1
		self._fen_update(pos, -1)
		del _lists[pos][idx]
		_list_lens[pos] -= 1
		if _list_lens[pos]:
			_mins[pos] = _lists[pos][0]
		else:
			del _lists[pos]
			del _list_lens[pos]
			del _mins[pos]
			self._rebuild = True

	def _loc_left(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(lo, pos) = (-1, len(_lists) - 1)
		while lo + 1 < pos:
			mi = lo + pos >> 1
			if value <= _mins[mi]:
				pos = mi
			else:
				lo = mi
		if pos and value <= _lists[pos - 1][-1]:
			pos -= 1
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value <= _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def _loc_right(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(pos, hi) = (0, len(_lists))
		while pos + 1 < hi:
			mi = pos + hi >> 1
			if value < _mins[mi]:
				hi = mi
			else:
				pos = mi
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value < _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def add(self, value):
		_load = self._load
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len += 1
		if _lists:
			(pos, idx) = self._loc_right(value)
			self._fen_update(pos, 1)
			_list = _lists[pos]
			_list.insert(idx, value)
			_list_lens[pos] += 1
			_mins[pos] = _list[0]
			if _load + _load < len(_list):
				_lists.insert(pos + 1, _list[_load:])
				_list_lens.insert(pos + 1, len(_list) - _load)
				_mins.insert(pos + 1, _list[_load])
				_list_lens[pos] = _load
				del _list[_load:]
				self._rebuild = True
		else:
			_lists.append([value])
			_mins.append(value)
			_list_lens.append(1)
			self._rebuild = True

	def discard(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_right(value)
			if idx and _lists[pos][idx - 1] == value:
				self._delete(pos, idx - 1)

	def remove(self, value):
		_len = self._len
		self.discard(value)
		if _len == self._len:
			raise ValueError('{0!r} not in list'.format(value))

	def pop(self, index=-1):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		value = self._lists[pos][idx]
		self._delete(pos, idx)
		return value

	def bisect_left(self, value):
		(pos, idx) = self._loc_left(value)
		return self._fen_query(pos) + idx

	def bisect_right(self, value):
		(pos, idx) = self._loc_right(value)
		return self._fen_query(pos) + idx

	def count(self, value):
		return self.bisect_right(value) - self.bisect_left(value)

	def __len__(self):
		return self._len

	def __getitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		return self._lists[pos][idx]

	def __delitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		self._delete(pos, idx)

	def __contains__(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_left(value)
			return idx < len(_lists[pos]) and _lists[pos][idx] == value
		return False

	def __iter__(self):
		return (value for _list in self._lists for value in _list)

	def __reversed__(self):
		return (value for _list in reversed(self._lists) for value in reversed(_list))

	def __repr__(self):
		return 'SortedList({0})'.format(list(self))

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			self.os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
import sys
from math import ceil, log2
INT_MAX = sys.maxsize
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import collections as col
import math, string

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())

def minVal(x, y):
	return x if x < y else y

def getMid(s, e):
	return s + (e - s) // 2

def RMQUtil(st, ss, se, qs, qe, index):
	if qs <= ss and qe >= se:
		return st[index]
	if se < qs or ss > qe:
		return INT_MAX
	mid = getMid(ss, se)
	return minVal(RMQUtil(st, ss, mid, qs, qe, 2 * index + 1), RMQUtil(st, mid + 1, se, qs, qe, 2 * index + 2))

def RMQ(st, n, qs, qe):
	if qs < 0 or qe > n - 1 or qs > qe:
		print('Invalid Input')
		return -1
	return RMQUtil(st, 0, n - 1, qs, qe, 0)

def constructSTUtil(arr, ss, se, st, si):
	if ss == se:
		st[si] = arr[ss]
		return arr[ss]
	mid = getMid(ss, se)
	st[si] = minVal(constructSTUtil(arr, ss, mid, st, si * 2 + 1), constructSTUtil(arr, mid + 1, se, st, si * 2 + 2))
	return st[si]

def constructST(arr, n):
	x = int(ceil(log2(n)))
	max_size = 2 * int(2 ** x) - 1
	st = [0] * max_size
	constructSTUtil(arr, 0, n - 1, st, 0)
	return st
MOD = 10 ** 9 + 7
mod = 10 ** 9 + 7
p = 10 ** 9 + 7

def ncr_util():
	inv[0] = inv[1] = 1
	fact[0] = fact[1] = 1
	for i in range(2, 300001):
		inv[i] = inv[i % p] * (p - p // i) % p
	for i in range(1, 300001):
		inv[i] = inv[i - 1] * inv[i] % p
		fact[i] = fact[i - 1] * i % p

def z_array(s1):
	n = len(s1)
	z = [0] * n
	(l, r, k) = (0, 0, 0)
	for i in range(1, n):
		if i > r:
			(l, r) = (i, i)
			while r < n and s1[r - l] == s1[r]:
				r += 1
			z[i] = r - l
			r -= 1
		else:
			k = i - l
			if z[k] < r - i + 1:
				z[i] = z[k]
			else:
				l = i
				while r < n and s1[r - l] == s1[r]:
					r += 1
				z[i] = r - l
				r -= 1
	return z

def primeFactors(n):
	d1 = {}
	while n % 2 == 0:
		d1[2] = d1.get(2, 0) + 1
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			d1[i] = d1.get(i, 0) + 1
			n = n // i
	if n > 2:
		d1[n] = d1.get(n, 0) + 1
	return d1

def fs(x):
	if x < 2:
		return 0
	return x * (x - 1) // 2
t = int(input())

def solve():
	le = []
	lo = []
	for i in l:
		if i % 2 == 0:
			le.append(i)
		else:
			lo.append(i)
	le.sort()
	lo.sort()
	(a, b) = (0, 0)
	turn = 0
	for i in range(n):
		if turn % 2 == 0:
			if len(lo) == 0:
				a += le[-1]
				le.pop()
			elif len(le) == 0:
				lo.pop()
			elif lo[-1] > le[-1]:
				lo.pop()
			else:
				a += le[-1]
				le.pop()
		elif len(le) == 0:
			b += lo[-1]
			lo.pop()
		elif len(lo) == 0:
			le.pop()
		elif le[-1] > lo[-1]:
			le.pop()
		else:
			b += lo[-1]
			lo.pop()
		turn += 1
	if a == b:
		return 'Tie'
	elif a > b:
		return 'Alice'
	else:
		return 'Bob'
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	print(solve())


import sys

def answer(n, a):
	a.sort(reverse=True)
	suma = 0
	sumb = 0
	for i in range(0, n, 2):
		if a[i] % 2 == 0:
			suma += a[i]
	for i in range(1, n, 2):
		if a[i] % 2 == 1:
			sumb += a[i]
	if suma > sumb:
		return 'Alice'
	elif suma == sumb:
		return 'Tie'
	else:
		return 'Bob'
	return

def main():
	t = int(input())
	while t:
		n = int(sys.stdin.readline().rstrip())
		a = [int(i) for i in sys.stdin.readline().split()]
		print(answer(n, a))
		t -= 1
	return
main()


def solve(arr, n):
	(A, B, turn) = (0, 0, True)
	arr.sort()
	for i in range(n - 1, -1, -1):
		if turn and arr[i] % 2 == 0:
			A += arr[i]
		elif not turn and arr[i] % 2 == 1:
			B += arr[i]
		turn = not turn
	if A > B:
		return 'Alice'
	elif B > A:
		return 'Bob'
	else:
		return 'Tie'
tc = int(input())
for _ in range(tc):
	n = int(input())
	arr = list(map(int, input().split()))
	print(solve(arr, n))


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	s1 = 0
	s2 = 0
	for i in range(n):
		if i % 2 == 0 and a[i] % 2 == 0:
			s1 += a[i]
		elif i % 2 == 1 and a[i] % 2 == 1:
			s2 += a[i]
	if s1 > s2:
		print('Alice')
	elif s1 < s2:
		print('Bob')
	else:
		print('Tie')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a, reverse=True)
	c = 0
	players = [0, 0]
	for num in a:
		if c % 2 == 0:
			players[0] += num if num % 2 == 0 else 0
		else:
			players[1] += num if num % 2 == 1 else 0
		c += 1
	if players[0] > players[1]:
		print('Alice')
	elif players[0] == players[1]:
		print('Tie')
	else:
		print('Bob')


test_cases = int(input())
for x in range(test_cases):
	a = 0
	b = 0
	i = int(input())
	l = list(map(int, input().split()))
	l = sorted(l)
	for move in range(1, len(l) + 1):
		n = l.pop()
		if move % 2 == 0 and n % 2 != 0:
			b += n
		elif move % 2 != 0 and n % 2 == 0:
			a += n
	if a > b:
		print('Alice')
	elif a == b:
		print('Tie')
	else:
		print('Bob')


test_case = int(input())
for i in range(0, test_case):
	test = int(input())
	array_list = []
	num = list(map(int, input().strip().split()))[:test]
	ans = 0
	num.sort(reverse=True)
	for n in range(0, test):
		if n % 2 == 0:
			if num[n] % 2 == 0:
				ans += num[n]
		elif num[n] % 2 == 1:
			ans -= num[n]
	if ans == 0:
		print('Tie')
	elif ans > 0:
		print('Alice')
	else:
		print('Bob')


from collections import defaultdict
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	(c1, c2) = (0, 0)
	for i in range(n):
		if i % 2 == 0:
			if a[i] % 2 == 0:
				c1 += a[i]
		elif a[i] % 2 == 1:
			c2 += a[i]
	if c1 == c2:
		print('Tie')
	elif c1 > c2:
		print('Alice')
	else:
		print('Bob')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr = sorted(arr, reverse=True)
	ans = 0
	for i in range(n):
		if i % 2 == 0:
			if arr[i] % 2 == 0:
				ans += arr[i]
		elif arr[i] % 2 != 0:
			ans -= arr[i]
	if ans == 0:
		print('Tie')
	elif ans > 0:
		print('Alice')
	else:
		print('Bob')


for _ in range(int(input())):
	n = int(input())
	arr = sorted(map(int, input().split()), reverse=True)
	alice = 0
	bob = 0
	turn = True
	for i in arr:
		if i % 2 == 0:
			if turn == True:
				alice += i
				turn = False
			else:
				turn = True
				continue
		elif turn == False:
			bob += i
			turn = True
		else:
			turn = False
			continue
	if alice == bob:
		print('Tie')
	elif alice > bob:
		print('Alice')
	else:
		print('Bob')


for _ in range(int(input())):
	n = int(input())
	a = []
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	i = 0
	od = 0
	ev = 0
	while i < n:
		if a[i] % 2 == 0:
			ev += a[i]
			i += 1
		else:
			i += 1
		if i >= n:
			break
		if a[i] % 2 != 0:
			od += a[i]
			i += 1
		else:
			i += 1
	if ev > od:
		print('Alice')
	elif od > ev:
		print('Bob')
	else:
		print('Tie')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a = sorted(a, reverse=True)
	alice = 0
	bob = 0
	for i in range(len(a)):
		if i % 2 == 0:
			if a[i] % 2 == 0:
				alice += a[i]
		elif a[i] % 2 == 1:
			bob += a[i]
	if alice > bob:
		print('Alice')
	elif alice == bob:
		print('Tie')
	else:
		print('Bob')


from itertools import repeat

def line():
	return map(int, input().split())

def num():
	return int(input())
t = num()
for _ in repeat(None, t):
	n = num()
	ass = sorted(line())[::-1]
	(alice, bob) = (0, 0)
	for (i, x) in enumerate(ass):
		if not i % 2 and (not x % 2):
			alice += x
		elif i % 2 and x % 2:
			bob += x
	if alice > bob:
		print('Alice')
	elif alice < bob:
		print('Bob')
	else:
		print('Tie')


lines = open(0).readlines()
n = int(lines[0])
for i in range(2, 2 + 2 * n, 2):
	l = list(map(int, lines[i].split()))
	l = sorted(l, reverse=True)
	scores = [0, 0]
	for (j, elem) in enumerate(l):
		if (j + elem) % 2 == 0:
			scores[j % 2] += elem
	if scores[0] > scores[1]:
		print('Alice')
	elif scores[1] > scores[0]:
		print('Bob')
	else:
		print('Tie')


for p in range(int(input())):
	(n, s) = (int(input()), 0)
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	for i in range(n):
		if i % 2:
			if l[i] % 2:
				s -= l[i]
		elif l[i] % 2 == 0:
			s += l[i]
	if s > 0:
		print('Alice')
	elif s < 0:
		print('Bob')
	else:
		print('Tie')