#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  for (int i = 0; i < T; i++) {
    int n, k;
    cin >> n >> k;
    bool res;
    if (n == 0) {
      res = 0;
    } else if (k % 3 == 0 && k != 0 && k <= n) {
      if ((n % (k + 1)) % 3 == 0 && (n % (k + 1) != k))
        res = 0;
      else
        res = 1;
    } else {
      if (n % 3 == 0)
        res = 0;
      else
        res = 1;
    }
    if (res)
      cout << "Alice" << endl;
    else
      cout << "Bob" << endl;
  }
  return 0;
}
