#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 7;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + 7;
const double eps = 1e-8;
const double PI = acos(-1);
template <class T, class S>
inline void add(T &a, S b) {
  a += b;
  if (a >= mod) a -= mod;
}
template <class T, class S>
inline void sub(T &a, S b) {
  a -= b;
  if (a < 0) a += mod;
}
template <class T, class S>
inline bool chkmax(T &a, S b) {
  return a < b ? a = b, true : false;
}
template <class T, class S>
inline bool chkmin(T &a, S b) {
  return a > b ? a = b, true : false;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int n, k;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d", &n, &k);
    if (k % 3 == 0) {
      int x = k / 3;
      int num = (x - 1) * 3 + 4;
      n %= num;
      if (n < (x - 1) * 3) {
        if (n % 3 == 0)
          puts("Bob");
        else
          puts("Alice");
      } else {
        n -= (x - 1) * 3;
        if (n == 0)
          puts("Bob");
        else
          puts("Alice");
      }
    } else {
      if (n % 3 == 0)
        puts("Bob");
      else
        puts("Alice");
    }
  }
  return 0;
}
