#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int n, k;
  for (int a = 0; a < t; a++) {
    cin >> n >> k;
    if (k % 3 != 0) {
      if (n % 3 == 0) {
        cout << "Bob"
             << "\n";
      } else {
        cout << "Alice"
             << "\n";
      }
    } else {
      n %= k + 1;
      if (n == k) {
        cout << "Alice"
             << "\n";
      } else if (n % 3 == 0) {
        cout << "Bob"
             << "\n";
      } else {
        cout << "Alice"
             << "\n";
      }
    }
  }
}
