#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(17);
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    if (k % 3) {
      if (n % 3)
        cout << "Alice\n";
      else
        cout << "Bob\n";
    } else {
      n %= (k + 1);
      if (n % 3 or n == k)
        cout << "Alice\n";
      else
        cout << "Bob\n";
    }
  };
  return 0;
}
