There is a round table in which N people are sitting. You can look at the image for their seating arrangement. Initially the person numbered X holds a gun. In addition to it there is a special number K that helps in determining the persons to be killed. The killing starts as follows -
Firstly the person numbered X starts and he kills a total of
Input
First line contains three numbers N , K and X as input.
Output
In the output you have to tell the number of the player who will be the winner.
Constraints
5 2 3
3
Initially the gun is with person 3. Value of
Please login to use the editor
You need to be logged in to access the code editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor