const int N = 1e6 + 5;
int t;
int main()
{
int c = 0,n,x;
cin >> t;
while (t--)
{
cin >> n;
int ans = 0;
f(i, 1, n)
{
scanf("%d", &x);
if (i % 6 == 2 || i % 6 == 5 || i % 6 == 0)
ans ^= x;
}
if (ans == 0)
printf("Case %d: Bob\n", ++c);
else printf("Case %d: Alice\n", ++c);
}
return 0;
}