CF896B Ithea Plays With Chtholly

Description

This is an interactive problem. Refer to the Interaction section below for better understanding. Ithea and Chtholly want to play a game in order to determine who can use the kitchen tonight. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF896B/ebd88a49a2a132acb0c645722b8cb8c3d385dabb.png) Initially, Ithea puts $ n $ clear sheets of paper in a line. They are numbered from $ 1 $ to $ n $ from left to right. This game will go on for $ m $ rounds. In each round, Ithea will give Chtholly an integer between $ 1 $ and $ c $ , and Chtholly needs to choose one of the sheets to write down this number (if there is already a number before, she will erase the original one and replace it with the new one). Chtholly wins if, at any time, all the sheets are filled with a number and the $ n $ numbers are in non-decreasing order looking from left to right from sheet $ 1 $ to sheet $ n $ , and if after $ m $ rounds she still doesn't win, she loses the game. Chtholly really wants to win the game as she wants to cook something for Willem. But she doesn't know how to win the game. So Chtholly finds you, and your task is to write a program to receive numbers that Ithea gives Chtholly and help her make the decision on which sheet of paper write this number.

Input Format

N/A

Output Format

N/A

Explanation/Hint

In the example, Chtholly initially knew there were $ 2 $ sheets, $ 4 $ rounds and each number was between $ 1 $ and $ 4 $ . She then received a $ 2 $ and decided to write it in the $ 1 $ st sheet. Then she received a $ 1 $ and wrote it in the $ 2 $ nd sheet. At last, she received a $ 3 $ and replaced $ 1 $ with $ 3 $ in the $ 2 $ nd sheet. At this time all the sheets were filled with a number and they were non-decreasing, so she won the game. Note that it is required that your program terminate immediately after Chtholly wins and do not read numbers from the input for the remaining rounds. If not, undefined behaviour may arise and it won't be sure whether your program will be accepted or rejected. Also because of this, please be careful when hacking others' codes. In the sample, Chtholly won the game after the $ 3 $ rd round, so it is required that your program doesn't read the number of the remaining $ 4 $ th round. The input format for hacking: - The first line contains 3 integers $ n,m $ and $ c $ ; - The following $ m $ lines each contains an integer between $ 1 $ and $ c $ , indicating the number given to Chtholly in each round.