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