Royal Croquet 2#722

Royal Croquet 2

1 second
64 megabytes
Very easy

"Everyone to their places!" shouted the Queen in a thunderous voice. Chaos ensued as everyone scrambled, bumping into each other, falling, and quickly getting back up. But within a minute, everyone was in their place, and the game began.

Alice thought she had never seen such a peculiar croquet ground for playing croquet: it was full of holes and furrows. The balls were hedgehogs, the mallets were flamingos, and the arches were soldiers. The soldiers formed arches and stood still throughout the game.

Initially, Alice struggled to control her flamingo: she would tuck it under her arm with its head down, pull its legs back, aim, and prepare to hit the hedgehog, only for it to bend its neck and look her straight in the eyes, causing her to laugh. By the time she managed to get it head down again, the hedgehog would have wandered off. Moreover, all her hedgehogs fell into holes, and the soldier-arches would straighten up and move to the other end of the ground. In short, Alice quickly concluded that this was a very challenging game.

Alice's Adventures in Wonderland (translated by N.M. Demurova)

In addition to the unusual ground and living sports equipment, the rules of this wonder-game were equally strange and confusing. All players hit at once, without waiting for their turn, constantly arguing and fighting over the hedgehogs. The Queen quickly became frustrated, stomping her feet and making comical threats to send players out of the game for breaking the rules.

Nevertheless, there are rules.

The game can be played by to players. Players take turns hitting their hedgehogs, trying to get them through the arches.

Serve

Each point begins with a serve. The right to serve rotates continuously among the players throughout the game.

Game

Each game starts with a score of zero. For the first two successful hits through the arches, a player earns points each, and for the third, another points. The next successful hit results in winning the game if the opponents have a score of or less. If all players have , winning the next serve gives an advantage. A player with an advantage who wins the next serve wins the game.

Set

A player who wins games is considered to have won the set. If after games the player next to the leader has games, another game is played. If the gap increases, the set ends. Otherwise, a tiebreak is played.

Match

A match can be -set or -set (at the discretion of the Queen of Hearts). In a -set match, the player who wins sets wins, and in a -set match, sets. The Queen may threaten dramatic, whimsical consequences for losing, but nothing serious ever happens.

Tiebreak

Players take turns making one hit each. The first to score points with a -point difference is considered to have won the tiebreak. The tiebreak lasts as long as necessary until a two-point difference is achieved. The last set in the game is played without a tiebreak.

The Cheshire Cat watched the whole game, smiling thoughtfully, and recorded the game protocol—that is, the player who won each serve. Determine who won this extraordinary competition.

Input

The input file consists of several lines, each describing a separate game. Each line contains the game protocol: first, an integer (2 \leq N \leq 5)—the number of players, followed by a string of uppercase English letters. Each letter in the string represents a player (—first, —second, etc.) who won a serve. The number of letters does not exceed .

Output

For each game, output a single character on a separate line representing the winner of the corresponding game.

Examples

Example 1

Loading
Loading