#include <bits/stdc++.h>
using namespace std;
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
template <class T>
int cntbit(T s) {
  return __builtin_popcount(s);
}
template <class T>
inline T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long t;
long long n, k;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> t;
  while (t--) {
    cin >> n >> k;
    if (k % 3 > 0) {
      if (n % 3 == 0)
        cout << "Bob\n";
      else
        cout << "Alice\n";
    } else {
      if (n < k) {
        if (n % 3 == 0)
          cout << "Bob\n";
        else
          cout << "Alice\n";
      } else {
        long long tmp = n - k;
        if (tmp == 0)
          cout << "Alice\n";
        else {
          tmp--;
          if (tmp % (k + 1) != k && tmp % (k + 1) % 3 == 0)
            cout << "Bob\n";
          else
            cout << "Alice\n";
        }
      }
    }
  }
  return 0;
}
