#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
T div_floor(T a, T b) {
  if (b < 0) a *= -1, b *= -1;
  return a >= 0 ? a / b : (a + 1) / b - 1;
}
template <class T>
T div_ceil(T a, T b) {
  if (b < 0) a *= -1, b *= -1;
  return a > 0 ? (a - 1) / b + 1 : a / b;
}
constexpr long long mod = 1000000007;
constexpr long long INF = mod * mod;
constexpr int MAX = 200010;
void solve() {
  int n, K;
  scanf("%d%d", &n, &K);
  if (n == K)
    puts("Alice");
  else if (K % 3 != 0 || n < K)
    puts(n % 3 != 0 ? "Alice" : "Bob");
  else {
    n %= K + 1;
    if (n % 3 == 0)
      puts(n == K ? "Alice" : "Bob");
    else
      puts("Alice");
  }
}
int main() {
  int t;
  scanf("%d", &t);
  for (int((tt)) = (int)(0); ((tt)) < (int)((t)); ++((tt))) solve();
}
