#include <bits/stdc++.h>
#define ll long long int
using namespace std;

int main(){
   int t;
   cin>>t;
   while(t--){
       int n;
       cin>>n;
       vector<ll> arr,brr;
       
       for(int i=0;i<n;i++){
           int x;
           cin>>x;
           if(x%2==0)
             arr.push_back(x);
        else
          brr.push_back(x);
          
       }
       ll al=0,bo=0;
       int a=arr.size()-1,b=brr.size()-1;
       sort(arr.begin(),arr.end());
       sort(brr.begin(),brr.end());
       int i=a,j=b,f=0;
       while(i>=0 || j>=0){
           int k=0;
           if(i>=0 && j>=0){
               k=max(arr[i],brr[j]);
           }
           else if(i>=0){
               k=arr[i];
           }
           else{
               k=brr[j];
           }
           if(f%2==0){
               if(k%2==0){
                   al+=k;
                   i--;
               }
               else
                j--;
              
           }
           else{
               if(k%2!=0){
                   bo+=k;
                   j--;
               }
               else
                i--;
           }
           f++;
       }
       if(al==bo){
           cout<<"Tie"<<endl;
       }
       else if(al>bo){
            cout<<"Alice"<<endl;
       }
       else
           cout<<"Bob"<<endl;
   }
}