#include <bits/stdc++.h>
using namespace std;
int i, j, cnt = 0;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    string jury = "Alice";
    int n, k;
    cin >> n >> k;
    if (k % 3 != 0) {
      if (n % 3 == 0) jury = "Bob";
    } else {
      n = n % (k + 1);
      if (n % 3 == 0 && n != k) jury = "Bob";
    }
    cout << jury << '\n';
  }
  return ~~(0 ^ 0 ^ 0);
}
