#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, k;
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> n >> k;
    if (k % 3 != 0 || (k > n)) {
      if (n % 3 == 0) {
        cout << "Bob" << endl;
        continue;
      }
      if (n % 3 != 0) {
        cout << "Alice" << endl;
        continue;
      }
    }
    n = n % (k + 1);
    if (n == k || n == (k - 1) || n == (k - 2)) {
      cout << "Alice" << endl;
      continue;
    }
    if (n % 3 == 0) {
      cout << "Bob" << endl;
      continue;
    }
    cout << "Alice" << endl;
  }
  return 0;
}
