#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    long long n, k;
    cin >> n >> k;
    if (k % 3) {
      if (n % 3)
        cout << "Alice\n";
      else
        cout << "Bob\n";
    } else {
      n %= (k + 1);
      if (n == k || n % 3)
        cout << "Alice\n";
      else
        cout << "Bob\n";
    }
  }
  return 0;
}
