Overhand Shuffle
You has been playing card games with Quinn but something seems suspicious. Quinn Keeps Wining! However, you notice Quinn's so-called "shuffling" isn't random at all! His shuffle works like this:
He takes the bottom card and the top card from the deck.
He then places them back on top of the deck in that same order (bottom card on deck then the top card is place ontop of it)
He repeats this process X times.
You want to figure out which card ends up at position K from the top after Quinn's shuffling, so you can finally beat him!





Input
The first line contains three integers
,
, and
— the number of cards in the deck, the number of shuffles, and the position from the top to check after shuffling
.
The second line contains space-separated integers
— the initial cards from top to bottom of the deck.
It is guaranteed that all are distinct.
Output
Output the card that is from the top (0 is the top card)
Example
Input 1
5 2 2
1 2 3 4 5
Output 1
5
Input 2
1 10 0
5
Output 2
5
Comments