#include <bits/stdc++.h>
struct compare {
  bool operator()(const int& l, const int& r) { return l > r; }
};
using namespace std;
priority_queue<int, vector<int>, compare> pq;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    if (k % 3 && n % 3 == 0) {
      cout << "Bob\n";
    } else if (k % 3 == 0) {
      n %= (k + 1);
      if (n % 3 == 0 && n != k) {
        cout << "Bob\n";
      } else {
        cout << "Alice\n";
      }
    } else {
      cout << "Alice\n";
    }
  }
}
