import std.stdio;
import std.algorithm;
import std.array;
import std.math;
import std.string;
// Entry point of the program
void main() {
// Read all input at once for efficiency
string data = stdin.readAll();
// Split the input into tokens based on whitespace
auto tokens = data.split!(c => c == ' ' || c == '\n' || c == '\r' || c == '\t')
.filter!(s => s.length > 0)
.array;
int ptr = 0; // Pointer to keep track of the current token
// Read the number of test cases
int t = tokens[ptr++].to!int;
// Process each test case
while (t-- > 0) {
// Read the value of n
int n = tokens[ptr++].to!int;
// Read array a
int[] a = new int[n];
foreach (i; 0 .. n) {
a[i] = tokens[ptr++].to!int;
}
// Read array b
int[] b = new int[n];
foreach (i; 0 .. n) {
b[i] = tokens[ptr++].to!int;
}
// Initialize arrays c, d, and p
int[] c = new int[n];
int[] d = new int[n];
int[] p = new int[n];
foreach (i; 0 .. n) {
c[i] = min(a[i], b[i]);
d[i] = a[i] - b[i];
p[i] = i; // Initialize p with indices 0 to n-1
}
// Sort the indices in p based on the comparator
p.sortWith!((x, y) {
if (c[x] > c[y]) return -1; // Descending order for c
if (c[x] < c[y]) return 1;
if (d[x] < d[y]) return -1; // Ascending order for d if c is equal
if (d[x] > d[y]) return 1;
return 0;
});
// Determine the result based on the sorted indices
string result;
if (d[p[0]] < 0) {
result = "Alice";
}
else if (n >= 2 && c[p[0]] == c[p[1]]) {
result = "Bob";
}
else if (d[p[0]] == 0) {
result = "Alice";
}
else if (d[p[0]] >= 0 && (n < 2 || (n >= 2 && d[p[1]] >= 0))) {
result = "Bob";
}
else {
result = "Alice";
}
// Output the result for the current test case
writeln(result);
}
}