#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int n, k, move = 1;
    cin >> n >> k;
    if (n == 0) {
      cout << "Bob" << endl;
      continue;
    }
    if (n == k) {
      cout << "Alice" << endl;
      continue;
    }
    if (k % 3 == 0 && k <= n) {
      n -= k;
      n = n % (k + 1);
      if (n == 0) {
        cout << "Alice" << endl;
        continue;
      }
      n--;
      if (n == 0) {
        cout << "Bob" << endl;
        continue;
      }
      if (n == k) {
        cout << "Alice" << endl;
        continue;
      }
      if (n % 3 == 0) {
        cout << "Bob" << endl;
        continue;
      } else {
        cout << "Alice" << endl;
        continue;
      }
    }
    if (n % 3 == 0) {
      cout << "Bob" << endl;
      continue;
    } else {
      cout << "Alice" << endl;
      continue;
    }
  }
  return 0;
}
