#c22802. 取石子游戏

取石子游戏

Stone Picking Game

Problem Description

There is a pile of xx stones. Alice and Bob take turns making moves, with Alice going first. In each of her turns, Alice may take a1,a2,…a_1, a_2, \dots, or an1a_{n_1} stones (that is, choose some aia_i and remove exactly aia_i stones); in each of his turns, Bob may take b1,b2,…b_1, b_2, \dots, or bn2b_{n_2} stones. Whoever cannot make a move loses.

For every x=1,2,…,mx = 1, 2, \dots, m, determine who wins.

Input Format

The first line contains three integers n1,n2,mn_1, n_2, m (n1,n2≤2000n_1, n_2 \le 2000, m≤2000m \le 2000).

The second line contains n1n_1 integers a1,a2,…,an1a_1, a_2, \dots, a_{n_1} (1≤ai≤m1 \le a_i \le m).

The third line contains n2n_2 integers b1,b2,…,bn2b_1, b_2, \dots, b_{n_2} (1≤bi≤m1 \le b_i \le m).

Output Format

Output mm lines, each containing either Alice or Bob, indicating the winner for that value of xx.

Sample Input

3 5 10
1 3 4
2 3 5 6 7

Sample Output

Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Bob

Constraints

n1,n2≤2000n_1, n_2 \le 2000, m≤2000m \le 2000, 1≤ai,bi≤m1 \le a_i, b_i \le m.