is playing Mario Kart!
At the beginning, when he starts a game he starts at last place, behind other racers. Given the names of the other racers and who passes, he wants to know what place he was and the names of all of the racers that finished the race before him. Because he is too busy grinding Mario Kart races, he would like you to do this for him.
Input Specification
The first line will contain integer , the number of racers in the game with .
The next lines will contain string , the name of the racer. It is guaranteed that the length of the names will not exceed 20 characters.
Any lines after these will be the racers that finished
, meaning that the race has finished. It is guaranteed that these names will exist and the number of races that he passes will be less than or equal to .
Output Specification
Output one integer, the place that
is in after passing some amount of racers, and the rest of the racers that were ahead of him, in the order given by the input.Sample Input 1
5
Dry Bones
Peach
Mario
Bowser
Wario
Bowser
Peach
Mario
finished
Sample Output 1
3
Dry Bones
Wario
Comments