AT_arc231_d [ARC231D] Choose Your Role

Description

This is an **interactive problem** (where your program interacts with the judge system via Standard Input and Output). There are $ N $ piles numbered from $ 1 $ to $ N $ . Each pile has $ N - 1 $ stones. Consider a game played by the first player and the second player using these. In the game, the players take turns alternately, starting with the first player. - The first player chooses one pile that has one or more stones, and removes between $ 1 $ and $ K $ stones, inclusive, from it. - The second player chooses between $ 1 $ and $ K $ piles, inclusive, each of which has one or more stones, and removes one stone from each of them. The player who first becomes unable to make a move loses. You will play this game against the judge. First, declare to the judge whether you will be the first player or the second player, and then play the game. ### Input & Output Format This is an interactive problem (where your program interacts with the judge system via Standard Input and Output). First, $ N $ and $ K $ are given in the following format; receive them from Standard Input. > $ N $ $ K $ #### When playing as the first player - First, output `First` followed by a newline. - Then, repeat the following interaction until the game ends. - First, output your move as the first player. If you remove $ j $ stones from pile $ i $ , output $ i $ and $ j $ in this order, separated by a space, followed by a newline. - Next, receive the judge's move as the second player. First, receive an integer $ k $ . It means the following. - $ k = -1 $ : This indicates that you have been judged as incorrect for this problem. Terminate your program immediately. - $ k = 0 $ : This indicates that you have been judged as correct for this problem. Terminate your program immediately. - $ k > 0 $ : Subsequently, $ k $ integers $ a_1, a_2, \cdots, a_k $ are given, separated by spaces. This indicates that the second player removes one stone from each of piles $ a_1, a_2, \cdots, a_k $ . #### When playing as the second player - First, output `Second` followed by a newline. - Then, repeat the following interaction until the game ends. - First, receive the judge's move as the first player. Receive two integers $ i $ and $ j $ . They mean the following. - $ i = -1 $ : In this case, $ j = -1 $ . This indicates that you have been judged as incorrect for this problem. Terminate your program immediately. - $ i = 0 $ : In this case, $ j = 0 $ . This indicates that you have been judged as correct for this problem. Terminate your program immediately. - $ i > 0 $ : This indicates that the first player removed $ j $ stones from pile $ i $ . - Next, output your move as the second player. If you remove one stone from each of piles $ a_1, a_2, \cdots, a_k $ , first output $ k $ followed by a newline. Then, output $ a_1, a_2, \cdots, a_k $ , separated by spaces, followed by a newline.

Input Format

N/A

Output Format

N/A

Explanation/Hint

### Notes - **For each output, add a newline at the end and flush Standard Output. Otherwise, you may receive a TLE verdict.** - If you win the game, you will be judged as correct. - If you lose the game, or if you make a malformed output, you will be judged as incorrect. - Once you receive from the judge that you have been judged correct or incorrect for this problem, terminate your program immediately. Otherwise, the verdict is indeterminate. - Note that extra newlines are considered as a malformed output. ### Sample Interaction #### Sample Interaction $ 1 $ The following is an example of the interaction when $ N = 3, K = 2 $ and you play as the first player. Input Output Explanation `3 2` First, the integers $ N, K $ are given. `First` Output to the judge that you will play as the first player. `3 1` Remove one stone from pile $ 3 $ . `2

1 3` The judge removes one stone from each of piles $ 1, 3 $ . `1 1` Remove one stone from pile $ 1 $ . `1

2` The judge removes one stone from pile $ 2 $ . `2 1` Remove one stone from pile $ 2 $ . `0` The judge has lost because it became unable to make a move, which indicates that you won the game and have been judged as correct. #### Sample Interaction $ 2 $ The following is an example of the interaction when $ N = 2, K = 1 $ and you play as the second player. Input Output Explanation `2 1` First, the integers $ N, K $ are given. `Second` Output to the judge that you will play as the second player. `1 1` The judge removes one stone from pile $ 1 $ . `1

2` Remove one stone from pile $ 2 $ . `0 0` The judge has lost because it became unable to make a move, which indicates that you won the game and have been judged as correct. These are merely examples of the interaction, and it is not guaranteed that the actual judge behaves in this way. ### Constraints - $ 2 \leq N \leq 200 $ - $ 1 \leq K \leq N $ - All input values are integers.