from array import * a = array('b', [0]*30000) def mex(s): for i in s: a[i] = 1 for i in range(max(s)+2): if a[i] == 0: for j in s: a[j] = 0 return i def states(i, x): return [x-k-A[i][x-k-1] for k in range(min(K+1, x))] from functools import * @cache def grundy(i, x): if x <= 0: return 0 s = {grundy(i, y) for y in states(i, x) if y>=0} return mex(s) if s else 0 P, K = map(int, input().split()); Z = 0 A = [[*map(int, input().split())][1:] for _ in range(P)] for i in range(P): Z ^= grundy(i, len(A[i])) print(['Alice can win.', 'Bob will win.'][Z<1])