Score : $200$ points
Alice, Bob and Charlie are playing Card Game for Three, as below:
a, b or c written on it. The orders of the cards in the decks cannot be rearranged.a, Alice takes the next turn.)You are given the initial decks of the players. More specifically, you are given three strings $S_A$, $S_B$ and $S_C$. The $i$-th $(1≦i≦|S_A|)$ letter in $S_A$ is the letter on the $i$-th card in Alice's initial deck. $S_B$ and $S_C$ describes Bob's and Charlie's initial decks in the same way.
Determine the winner of the game.
a, b or c.The input is given from Standard Input in the following format:
$S_A$ $S_B$ $S_C$
If Alice will win, print A. If Bob will win, print B. If Charlie will win, print C.
aca accc ca
A
The game will progress as below:
a. Alice takes the next turn.c. Charlie takes the next turn.c. Charlie takes the next turn.a. Alice takes the next turn.a. Alice takes the next turn.abcb aacb bccc
C