#include <bits/stdc++.h>
using namespace std;
int n, k, t, dp[100002];
int main() {
  cin >> t;
  k = 103;
  for (int i = 1; i <= 100000; i++) {
    bool ok = 0;
    if (!dp[i - 1]) ok = 1;
    if (i > 1 && !dp[i - 2]) ok = 1;
    if (i >= k && !dp[i - k]) ok = 1;
    dp[i] = ok;
    if (i % 3 == 0 && dp[i]) cout << "cdvsdf";
  }
  while (t--) {
    cin >> n >> k;
    if (k % 3 == 0) {
      if (n < k)
        if (n % 3 == 0)
          cout << "Bob\n";
        else
          cout << "Alice\n";
      else if (n == k)
        cout << "Alice\n";
      else {
        int nr = k + 1;
        if ((n - k - 1) % nr % 3 == 0 && (n - k - 1) % nr != nr - 1)
          cout << "Bob\n";
        else
          cout << "Alice\n";
      }
    } else {
      if (n % 3 == 0)
        cout << "Bob\n";
      else
        cout << "Alice\n";
    }
  }
  return 0;
}
