program ConvertToPascal;
{$APPTYPE CONSOLE}
uses
SysUtils;
const
N = 1000009;
var
a, b, c_, d_, p, tmp: array[1..N] of LongInt;
n, t: LongInt;
// Function to compare two indices based on c and d arrays
function Compare(x, y: LongInt): Boolean;
begin
if c_[x] > c_[y] then
Exit(True)
else if c_[x] = c_[y] then
Exit(d_[x] < d_[y])
else
Exit(False);
end;
// MergeSort procedure to sort the p array based on the Compare function
procedure MergeSortProc(left, right: LongInt);
var
mid, i, j, k: LongInt;
begin
if left >= right then
Exit;
mid := (left + right) div 2;
MergeSortProc(left, mid);
MergeSortProc(mid + 1, right);
i := left;
j := mid + 1;
k := left;
while (i <= mid) and (j <= right) do
begin
if Compare(p[i], p[j]) then
begin
tmp[k] := p[i];
Inc(i);
end
else
begin
tmp[k] := p[j];
Inc(j);
end;
Inc(k);
end;
while i <= mid do
begin
tmp[k] := p[i];
Inc(i);
Inc(k);
end;
while j <= right do
begin
tmp[k] := p[j];
Inc(j);
Inc(k);
end;
for k := left to right do
p[k] := tmp[k];
end;
// Procedure to solve each test case
procedure Solve();
var
i: LongInt;
begin
Read(n);
for i := 1 to n do
Read(a[i]);
for i := 1 to n do
Read(b[i]);
for i := 1 to n do
begin
if a[i] < b[i] then
c_[i] := a[i]
else
c_[i] := b[i];
d_[i] := a[i] - b[i];
p[i] := i;
end;
// Sort the p array based on the custom comparator
MergeSortProc(1, n);
// Determine the result based on sorted p array
if d_[p[1]] < 0 then
WriteLn('Alice')
else if (n >= 2) and (c_[p[1]] = c_[p[2]]) then
WriteLn('Bob')
else if d_[p[1]] = 0 then
WriteLn('Alice')
else if (d_[p[1]] >= 0) and ((n >= 2) and (d_[p[2]] >= 0)) then
WriteLn('Bob')
else
WriteLn('Alice');
end;
// Main program
begin
ReadLn(t);
while t > 0 do
begin
Solve();
Dec(t);
end;
end.