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