#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream& operator<<(ostream& out, vector<T> a) {
  for (int i = (int)(0); i < (int)((int)a.size()); i++)
    out << a[i] << (i != (int)a.size() - 1 ? " " : "");
  return out;
}
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& a) {
  in >> a.first >> a.second;
  return in;
}
struct fastio {
  fastio() {
    string filename = "";
    if (filename.size()) {
      string inp = filename + ".in";
      string out = filename + ".out";
      freopen(inp.c_str(), "r", stdin);
      freopen(out.c_str(), "w", stdout);
    }
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout << showpoint;
    cout << setprecision(12);
    cout << fixed;
    cerr << showpoint;
    cerr << setprecision(3);
    cerr << fixed;
  }
} _____;
const int MAX = 2e5 + 10;
const long long INF = 1e9 + 10;
const long double EPS = 1e-8;
const long long MOD = 1e9 + 7;
void solve() {
  int T;
  cin >> T;
  for (int ___ = (int)(0); ___ < (int)(T); ___++) {
    int n, k;
    cin >> n >> k;
    if (k % 3 == 0) {
      int m = k / 3 - 1;
      m = m * 3 + 4;
      n %= m;
      ;
      ;
      if (n == m - 4)
        cout << "Bob" << endl;
      else if (n > m - 4)
        cout << "Alice" << endl;
      if (n >= m - 4) continue;
      if (n % 3) {
        cout << "Alice"
             << "\n";
      } else
        cout << "Bob"
             << "\n";
    } else {
      if (n % 3 == 0)
        cout << "Bob"
             << "\n";
      else
        cout << "Alice"
             << "\n";
    }
  }
}
int main() {
  solve();
  return 0;
}
