#include <bits/stdc++.h>
using namespace std;
const long long maxnodes = 1005;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    if (k % 3 != 0) {
      if (n % 3 == 0)
        cout << "Bob";
      else
        cout << "Alice";
    } else {
      long long r = n % (k + 1);
      if (r % 3 == 0 and r != k)
        cout << "Bob";
      else
        cout << "Alice";
    }
    cout << "\n";
  }
}
