#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, k;
  cin >> n >> k;
  if (k % 3) {
    if (n % 3)
      cout << "Alice" << endl;
    else
      cout << "Bob" << endl;
    return;
  }
  n %= (k + 1);
  if (n == k || n % 3)
    cout << "Alice" << endl;
  else
    cout << "Bob" << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    solve();
  }
  return 0;
}
