#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-11;
template <class T>
inline void ckmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
inline void ckmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
const int maxsize = 200000 + 16;
int main() {
  std::ios::sync_with_stdio(false);
  int n, f;
  while (cin >> n >> f) {
    vector<int> is_prime(maxsize, 1);
    vector<int> p;
    bitset<maxsize> d;
    for (int i = (2); i < (maxsize); ++i)
      if (is_prime[i]) {
        p.push_back(i);
        d.set(i);
        for (int j = i + i; j < maxsize; j += i) is_prime[j] = 0;
      }
    for (int i = 0; i < (((int)p.size())); ++i)
      for (int j = (i); j < (((int)p.size())); ++j) {
        if ((long long)p[i] * p[j] >= maxsize) break;
        d.set(p[i] * p[j]);
      }
    vector<int> sg(maxsize);
    bitset<maxsize> mask[128];
    for (int i = 0; i < (maxsize); ++i) {
      for (sg[i] = 0; mask[sg[i]][i]; ++sg[i])
        ;
      assert(sg[i] < 128);
      mask[sg[i]] |= (d << i);
    }
    int w = 0;
    for (int i = 0; i < (n); ++i) {
      int a, b, c;
      cin >> a >> b >> c;
      w ^= sg[b - a - 1];
      w ^= sg[c - b - 1];
    }
    string player1 = "Alice";
    string player2 = "Bob";
    if (!w) swap(player1, player2);
    printf("%s\n%s\n", player1.c_str(), player2.c_str());
    break;
  }
  return 0;
}
