Sneaky elephant calf
- Akim, Andriy Serhiyovych, Andriy Serhiyovych.
- Andriy Serhiyovych, Akim, Andriy Serhiyovych.
- Andriy Serhiyovych, Andriy Serhiyovych, Akim.
- I am a sneaky little elephant.
On the first day of LKS, the teachers of house 42 decided to get to know the children by playing a game called "sneaky little elephant". This engaging game for n players follows these straightforward rules:
Players take turns in a circle. During a turn, a player must list the names of all n players in a specific order. If a sequence of names has already been mentioned by someone else, or if a player cannot come up with a new sequence, they lose. The losing player is dubbed a sneaky little elephant and is given large gray cardboard ears.
Who will lose this game if no player makes a mistake?
Input
The input file contains the names of all n players in the order in which they take their first turn, with one name per line. Each player's name consists solely of Latin letters and is no longer than 20 characters. The number of players ranges from 2 to 10.
Output
Output the name of the player who will become the sneaky little elephant if no player makes a mistake.
Note to the example
In the provided example, there are 7! = 5040 different permutations of the names of seven players. Therefore, after 720 rounds of seven moves each, the player named Roman will be unable to list a new sequence and will become the sneaky little elephant.
P. S. The names in the example input data are fictional, and any resemblance to real people is purely coincidental.