#CF1877E. Autosynthesis

Autosynthesis

Chaneka writes down an array aa of nn positive integer elements. Initially, all elements are not circled. In one operation, Chaneka can circle an element. It is possible to circle the same element more than once.

After doing all operations, Chaneka makes a sequence rr consisting of all uncircled elements of aa following the order of their indices.

Chaneka also makes another sequence pp such that its length is equal to the number of operations performed and pip_i is the index of the element that is circled in the ii-th operation.

Chaneka wants to do several operations such that sequence rr is equal to sequence pp. Help her achieve this, or report if it is impossible! Note that if there are multiple solutions, you can print any of them.