The little math students have a hard time with algebraic structures, so the kindergarten decided to practice operations on permutations. To give the exercise some content, the teachers defined an unusual operation, the triangular operation.
A triangular operation takes three parameters i, j, k, and the three are pairwise different (i=j, j=k, k=i). Applying it to a permutation moves the number at position i to position j, the number at position j to position k, and the number at position k to position i.
The identity permutation is the permutation that holds the number i at position i. The students have to decide whether the identity permutation can be turned into a given permutation by applying triangular operations repeatedly. You write the program that checks their answer.
The input consists of several blocks. The first line of each block holds the number of elements of the permutation N (3≤N≤100000). The second line holds N pairwise distinct integers from 1 to N, and that sequence is the target permutation.
The last line of the input holds a single 0. Do not process that line.
Print one line for each block. Print Permutaci lze prevest. if the given permutation can be obtained from the identity permutation by a sequence of triangular operations, and print Matfyzacci maji smulu. if it cannot.