#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
int n, m;
char mp[N];
long long a[N], b[N], c[N], tmp, first, second;
vector<int> v;
int vis[N];
int num[26];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  function<int(int, int)> id = [&](int first, int second) -> int {
    return first * m + second;
  };
  function<int(int, int)> cal = [&](int first, int second) -> int {
    if (mp[id(first, second)] == '*') return n - a[first] + m - b[second];
    return n - a[first] + m - b[second] - 1;
  };
  int T;
  cin >> T;
  while (T--) {
    cin >> first >> second;
    if (second % 3 == 0) {
      long long tt = second + 1;
      first %= tt;
      if (first == second)
        cout << "Alice" << endl;
      else if (first % 3 == 0)
        cout << "Bob" << endl;
      else
        cout << "Alice" << endl;
    } else {
      if (first % 3 == 0)
        cout << "Bob" << endl;
      else
        cout << "Alice" << endl;
    }
  }
}
