{"raw_statement":[{"iden":"problem statement","content":"We will hand out a total of $K$ cards to $N$ people numbered $1, 2, \\ldots, N$.\nBeginning with Person $A$, we will give the cards one by one to the people in this order: $A, A+1, A+2, \\ldots, N, 1, 2, \\ldots$. Who will get the last card?\nFormally, after Person $x(1 \\leq x < N)$ gets a card, Person $x+1$ will get a card. After Person $N$ gets a card, Person $1$ gets a card."},{"iden":"constraints","content":"*   $1 \\leq N,K \\leq 1000$\n*   $1 \\leq A \\leq N$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $K$ $A$"},{"iden":"sample input 1","content":"3 3 2"},{"iden":"sample output 1","content":"1\n\nThe cards are given to Person $2, 3, 1$ in this order."},{"iden":"sample input 2","content":"1 100 1"},{"iden":"sample output 2","content":"1"},{"iden":"sample input 3","content":"3 14 2"},{"iden":"sample output 3","content":"3"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}