#K45067. Taco Game Winner Determination
Taco Game Winner Determination
Taco Game Winner Determination
In this problem, two players, Alice and Bob, play a game on a string. The game is based on the number of contiguous groups of identical characters in the string. Alice always starts first. If the number of groups is odd then Alice wins, otherwise Bob wins. This rule can be written in mathematical form as: $$groups \mod 2 = 1 \implies Alice \quad \text{and} \quad groups \mod 2 = 0 \implies Bob.$$ Your task is to determine the winner given the initial string configuration.
inputFormat
The input consists of a single line containing the string s
. The string may be empty and will consist only of lowercase letters.
outputFormat
Output a single line with the name of the winner: either Alice
or Bob
.
aaabbbcc
Alice