atcoder#ABC304A. [ABC304A] First Player
[ABC304A] First Player
Score : points
Problem Statement
There are people numbered , sitting in this clockwise order around a round table. In particular, person is sitting next to person in the clockwise direction.
For each , person has a name and an age . Here, no two people have the same name or the same age.
Starting from the youngest person, print the names of all people in the order of their seating positions in clockwise order.
Constraints
- is an integer.
- is a string of length between and , consisting of lowercase English letters.
- is an integer.
Input
The input is given from Standard Input in the following format:
Output
Print lines. For each , the -th line should contain the name of the person sitting in the -th position clockwise from the youngest person.
5
alice 31
bob 41
carol 5
dave 92
ellen 65
carol
dave
ellen
alice
bob
The youngest person is person . Therefore, starting from person , print the names in the clockwise order of their seating positions: person , person , person , person , and person .
2
takahashi 1000000000
aoki 999999999
aoki
takahashi