#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    if (k == n) {
      cout << "Alice\n";
      continue;
    }
    if (k > n || k % 3 != 0) {
      if (n % 3 == 0) {
        cout << "Bob\n";
      } else {
        cout << "Alice\n";
      }
      continue;
    }
    long long z = n % (k + 1);
    if (z % 3 == 0 && z != k) {
      cout << "Bob\n";
    } else {
      cout << "Alice\n";
    }
  }
  return 0;
}
