P4136 Who Will Win?

Description

Xiao Ming and Xiao Hong often play a game. Given an $n \times n$ board, a stone is placed at the upper-left corner. They take turns moving the stone. On each turn, a player may move the stone exactly one cell in one of the four directions: up, down, left, or right, and the destination cell must not have been visited before. The player who cannot move loses. If Xiao Ming moves first and both players play optimally, who will win?

Input Format

There are multiple test cases. Each test case consists of a single integer $n$, the size of the board, on its own line. Input ends when $n = 0$.

Output Format

For each test case, if Xiao Ming eventually wins, output `Alice`; otherwise output `Bob`. Print one answer per line.

Explanation/Hint

- For $20\%$ of the testdata, $1 \le n \le 10$. - For $40\%$ of the testdata, $1 \le n \le 1000$. - For $100\%$ of the testdata, $1 \le n \le 10000$. Translated by ChatGPT 5