Problem F
Knigs of the Forest

All moose are knigs of the forest, but your latest moose-friend, Karl-Älgtav, is more interesting than most. In part because of his fondness of fermented blueberries, and in part because of the tribe he lives in. Each year his tribe holds a tournament to determine that year’s alpha-moose. The winner gets to lead the tribe for a year, and then permanently leaves the tribe. The pool of contenders stays constant over the years, apart from the old alpha-moose being replaced by a newcomer in each tournament.
Karl-Älgtav has recently begun to wonder when it will be his
turn to win, and has asked you to help him determine this. He
has supplied a list of the strength of each of the other moose
in his tribe that will compete during the next
Input
The first line of input contains two space separated
integers
Next is a single line describing Karl-Älgtav, containing the
two integers
Then follow
Note that exactly
You may assume that the strength of each moose is unique.
Output
The year Karl-Älgtav wins the tournament, or unknown if the given data is insufficient for determining this.
Sample Input 1 | Sample Output 1 |
---|---|
2 4 2013 2 2011 1 2011 3 2014 4 2012 6 |
2013 |
Sample Input 2 | Sample Output 2 |
---|---|
2 4 2011 1 2013 2 2012 4 2011 5 2014 3 |
unknown |