#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 7;
int cnt[maxn];
int main() {
  int q;
  cin >> q;
  string s, t, a;
  while (q--) {
    int n, k;
    cin >> n >> k;
    if (k % 3 == 0) {
      n %= (k + 1);
      if (n % 3 == 0 && n != k)
        cout << "Bob" << endl;
      else
        cout << "Alice" << endl;
    } else {
      if (n % 3 == 0)
        cout << "Bob" << endl;
      else
        cout << "Alice" << endl;
    }
  }
  return 0;
}
