Problem:
Score : 700 points

Problem Statement

For strings s and t, we will say that s and t are prefix-free when neither is a prefix of the other.

Let L be a positive integer. A set of strings S is a good string set when the following conditions hold true:

Each string in S has a length between 1 and L (inclusive) and consists of the characters 0 and 1.

Any two distinct strings in S are prefix-free.

We have a good string set S = \{ s_1, s_2, ..., s_N \}. Alice and Bob will play a game against each other. They will alternately perform the following operation, starting from Alice:

Add a new string to S. After addition, S must still be a good string set.

The first player who becomes unable to perform the operation loses the game. Determine the winner of the game when both players play optimally.

Constraints

1 \leq N \leq 10^5

1 \leq L \leq 10^{18}

s_1, s_2, ..., s_N are all distinct.

{ s_1, s_2, ..., s_N } is a good string set.

|s_1| + |s_2| + ... + |s_N| \leq 10^5

Input

Input is given from Standard Input in the following format:

N L
s_1
s_2
:
s_N

Output

If Alice will win, print Alice; if Bob will win, print Bob.

Sample Input 1

2 2
00
01

Sample Output 1

Alice

If Alice adds 1, Bob will be unable to add a new string.

Sample Input 2

2 2
00
11

Sample Output 2

Bob

There are two strings that Alice can add on the first turn: 01 and 10.
In case she adds 01, if Bob add 10, she will be unable to add a new string.
Also, in case she adds 10, if Bob add 01, she will be unable to add a new string.

Sample Input 3

3 3
0
10
110

Sample Output 3

Alice

If Alice adds 111, Bob will be unable to add a new string.

Sample Input 4

2 1
0
1

Sample Output 4

Bob

Alice is unable to add a new string on the first turn.

Sample Input 5

1 2
11

Sample Output 5

Alice

Sample Input 6

2 3
101
11

Sample Output 6

Bob

Solution in Rust (1.15.1) (judge verdict: Accepted)

use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

const KIND_NUM: usize = 2;
type TrieValue = usize;
#[derive(Clone)]
struct TrieNode {
    child: Vec<Option<usize>>,
}
impl TrieNode {
    fn new() -> TrieNode {
        TrieNode {
            child: vec![None; KIND_NUM],
        }
    }
}
struct Trie {
    pool: Vec<TrieNode>,
}
impl Trie {
    fn new() -> Trie {
        Trie {
            pool: vec![TrieNode::new(); 1],
        }
    }
    fn push(&mut self, vs: Vec<TrieValue>) {
        let mut index = 0;
        for v in vs {
            let v = v as usize;
            if self.pool[index].child[v] == None {
                self.pool[index].child[v] = Some(self.pool.len());
                self.pool.push(TrieNode::new());
            }
            index = self.pool[index].child[v].unwrap();
        }
    }
}

fn get_grundy_number(v: u64) -> u64 {
    if v == 0 {
        0
    } else {
        1 << v.trailing_zeros()
    }
}

fn dfs(trie: &Trie, depth: u64, index: usize, l: u64) -> u64 {
    let node = &trie.pool[index];
    let mut ret = 0;
    if node.child[0] != None || node.child[1] != None {
        for i in 0..2 {
            if let Some(nindex) = node.child[i] {
                ret ^= dfs(trie, depth + 1, nindex, l);
            } else {
                ret ^= get_grundy_number(l - depth);
            }
        }
    }
    return ret;
}

fn main() {
    let n: usize = read();
    let l: u64 = read();
    let mut trie = Trie::new();
    for _ in 0..n {
        let s: String = read();
        let s = s.chars().map(|c| (c as usize -'0' as usize) as usize).collect::<Vec<usize>>();
        trie.push(s);
    }
    let ans = dfs(&trie, 0, 0, l);
    println!("{}", if ans != 0 { "Alice" } else { "Bob" });
}