Given an array a of size indexed from 0 to and q queries of type:
(): Print .
(): Assign value v to every ().
(): Permute array a by permutation p, . Because it can be proved that p is a permutation.
If we permute array s by permutation p then the resulting array v will satisfy the condition that .
The first line contains numbers n () and q ().
The second line contains numbers - () separated by space.
Each of the next q lines contains one type of query from the above mentioned types of queries.
For each query of first type, output a line containing the answer in chronological order.
For first query the answer is .
After the second query the array is .
After third query the array is .
At fourth query the answer is .
At fifth query the answer is .