Vasya write permutation p_1 p_2 ldot p_n integer 1 n 1 leq leq n true 1 leq p_i leq n p_1 p_2 ldot p_n different after write n number next_1 next_2 ldot next_n the number next_i equal minimal index j leq n p_j p_i if j let let define next_i n 1in evening Vasya go home school rain notebook get wet now impossible read write number permutation value next_i completely lose if value next_i lose let next_i 1you give number next_1 next_2 ldot next_n maybe equal 1 help Vasya find permutation p_1 p_2 ldot p_n integer 1 n write notebook number next_i equal 1 correct