直接暴力
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<cmath>
#include<set>
#include<queue>
#include<stack>
#include<map>
#define PI acos(-1.0)
#define in freopen("in.txt", "r", stdin)
#define out freopen("out.txt", "w", stdout)
#define kuaidian ios::sync_with_stdio(0);
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int maxn = 1e6 + 7, maxd = 1e8;
const ll mod = 1e9 + 7;
const int INF = 0x7f7f7f7f;
int a[9], b[9];
int main() {
int T;
scanf("%d", &T);
for(int tt = 0; tt < T; ++tt) {
for(int i = 0; i < 6; ++i)
scanf("%d", &a[i]);
for(int i = 0; i < 6; ++i)
scanf("%d", &b[i]);
int t1 = 0, t2 = 0;
for(int i = 0; i < 6; ++i) {
for(int j = 0; j < 6; ++j) {
if(a[i] > b[j]) t1++;
else if(a[i] < b[j]) t2++;
}
}
if(t1 == t2) puts("Tie");
else if(t1 > t2) puts("Alice");
else puts("Bob");
}
return 0;
}