#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    int n, k;
    cin >> n >> k;
    if (n == 0) {
      cout << "Bob" << endl;
      continue;
    } else if (n == 1 || n == 1 || n == k) {
      cout << "Alice" << endl;
      continue;
    }
    bool ans = 0;
    if (k % 3 != 0) {
      ans = (n % 3 != 0);
    } else {
      n = n % (k + 1);
      if (n == k || n == k - 1 || n == k - 2 || n % 3 != 0)
        ans = 1;
      else
        ans = 0;
    }
    if (ans)
      cout << "Alice" << endl;
    else
      cout << "Bob" << endl;
  }
  return 0;
}
