#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, k;
  cin >> n >> k;
  bool win = true;
  if (k % 3 == 0) {
    if (n % (k + 1) != k && (n % (k + 1)) % 3 == 0) win = false;
  } else if (n % 3 == 0)
    win = false;
  puts(win ? "Alice" : "Bob");
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
