#include <bits/stdc++.h>
#pragma comment(linker, "/stack:247474112")
#pragma GCC optimize("Ofast")
using namespace std;
string ans[2] = {"Bob", "Alice"};
void solve() {
  long long n, k;
  cin >> n >> k;
  if (k % 3 != 0) {
    if (n % 3)
      cout << ans[1];
    else
      cout << ans[0];
    return;
  }
  long long per_cycle = (k / 3 - 1) * 3 + 4;
  n %= per_cycle;
  if (n == 0) n = per_cycle;
  if (n <= (k / 3 - 1) * 3) {
    if (n % 3)
      cout << ans[1];
    else
      cout << ans[0];
  } else {
    n -= (k / 3 - 1) * 3;
    if (n != 4)
      cout << ans[1];
    else
      cout << ans[0];
  }
}
int32_t main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    solve();
    cout << '\n';
  }
  return 0;
}
