Given a permutation with size

and an integer

, you should find a permutation substitution

that

will become

after performing substitution

for exactly

times. Print the permutation after performing

for once on

. If there are multiple solutions, print any of them. If there is no solution, print "-1" in one line.
输入描述:
The first line contains two integers
.
The second line contains
integers
, denoting the permutation
.
It is guaranteed that
is a prime number.
输出描述:
If there exists solutions, print n integers in one line, or print "-1" in one line.