#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    if (n < k) {
      if (!(n % 3))
        cout << "Bob";
      else
        cout << "Alice";
      cout << "\n";
      continue;
    }
    if (k % 3 != 0) {
      if (!(n % 3))
        cout << "Bob";
      else
        cout << "Alice";
      cout << "\n";
      continue;
    }
    if (n % (3 * k + 3) < k) {
      if (!(n % 3))
        cout << "Bob";
      else
        cout << "Alice";
      cout << "\n";
      continue;
    }
    if (n % (3 * k + 3) == k) {
      cout << "Alice\n";
      continue;
    }
    if (n % (3 * k + 3) < (2 * k + 1)) {
      if ((n % 3) == 1)
        cout << "Bob";
      else
        cout << "Alice";
      cout << "\n";
      continue;
    }
    if (n % (3 * k + 3) == (2 * k + 1)) {
      cout << "Alice\n";
      continue;
    }
    if (n % (3 * k + 3) < (3 * k + 2)) {
      if ((n % 3) == 2)
        cout << "Bob";
      else
        cout << "Alice";
      cout << "\n";
      continue;
    }
    if (n % (3 * k + 3) == (3 * k + 2)) {
      cout << "Alice\n";
      continue;
    }
  }
}
