9153: Agnej

内存限制:128 MB 时间限制:1 S
题面:传统 评测方式:文本比较 上传者:
提交:0 通过:0

题目描述


Jenga is a game of physical skill created by British board game designer and author Leslie Scott. Jenga is played with 54 wooden blocks. Players take turns removing one block from any layer below the highest completed one and placing it horizontally atop the tower, perpendicular to any blocks on which it is to rest. The game ends when any portion of the tower collapses, caused by either the removal of a block or its new placement.


Alice and Bob are playing Agnej, a Jenga-liked building blocks game. At the beginning, Alice build a block tower of n+1n+1n+1 layers. The blocks within each layer are oriented in the same direction, with their long sides touching, and are perpendicular to the ones in the layer immediately below. Each block is mmm times as long as it is wide, so there are exactly mmm positions to place blocks in each layer, numbered from 111 to mmm. Alice and Bob take turns removing one block from any layer except the top layer, and the removed block won't be placed back atop the tower. The player who causes the tower to collapse loses the game, while the other player wins.

For simplicity, we can assume that the blocks from layer 111 (from top to bottom) to layer i−1i-1i1 are light enough for the blocks of layer iii, and both Alice and Bob are careful enough when removing blocks. Therefore, the tower will collapse if and only if after a player removes a block of some layer lll, there are no blocks on position 111 through position ⌈m2⌉\lceil \frac{m}{2} \rceil2m in layer lll, or there are no blocks on position ⌊m2⌋+1\lfloor \frac{m}{2} \rfloor + 12m+1 through position mmm in layer lll.

You are given the initial shape of the tower. Assume both Alice and Bob plays optimally and Alice plays first, please determine who will win the game.

输入格式


The first line contains two integer nnn and mmm (1≤n,m≤105, 1≤n×m≤1051\le n, m\le 10^5, ~1\le n\times m\le 10^51n,m105, 1n×m105).
Then follows nnn lines. The iii-th line contains a 0-1 string of length mmm, denoting the shape of layer i+1i+1i+1 (from top to bottom). The jjj-th bit of the string denotes whether there is a block at jjj-th position (0 denotes no while 1 denotes yes).
Please note that the top layer does not affect the answer, so it does not appear in input. The input just shows the shape from layer 2 to layer n+1n+1n+1. You can assume the top layer is not empty.
It is guaranteed that the tower won't collapse before the game starts.

输出格式


Print ``Alice'' if Alice will win the game, ``Bob'' otherwise (both without quotes).

输入样例 复制

4 3
111
101
110
010

输出样例 复制

Alice