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