407382: GYM102780 F A word game
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
F. A word gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output
Alice and Bob are playing the following game:
- a word is written on paper in front of the players
- in one move, a player can erase one letter, or two identical letters, or, all letters of the same type
- players take turns
- Alice is the first to start
- it is the player, who erases the last letter, that wins.
Write a program that will determine the winner of the described above game for a given word (given that the players play optimally (successfully).
InputThe input contains a single line — the starting word. The word consists of capital Latin letters, and its length does not exceed 40 characters.
OutputType "Alice" (without quotes) if Alice wins, or "Bob" (without quotes) if Bob wins.
ExamplesInputZADACHAOutput
AliceInput
WORDOutput
BobNote
For example, in the word "ZADACHA", Alice erases all the letters "A" by her first move. The word "Z.D.CH." remains, and she wins because, in subsequent moves, the players are forced to erase only one letter at a time.