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