Scientists recently invented a new game called CRP to test the IQ of people, as well as push them past their limits. CRP is a single player game that can be played using $$$2$$$ boards and a pen.
Assume that the two boards are named $$$A$$$ and $$$B$$$. You are given a sequence of $$$N$$$ numbers, each one belonging to the set $$$\{0,1,2,3\}$$$. The sequence is currently written on board $$$A$$$. In order to win the game, you need to move all numbers from board $$$A$$$ to board $$$B$$$ with the smallest amount of moves, such that all numbers with equal values are adjacent to each other on board $$$B$$$.
To move a number from $$$A$$$ to $$$B$$$, you are allowed to make use of the following operations described below:
1. Operation $$$C$$$: This operation is denoted by the letter $$$c$$$. In this operation, you can replace every number on board $$$A$$$ with its complement. For example, $$$x$$$ becomes $$$3-x$$$.
2. Operation $$$R$$$: This operation is denoted by the letter $$$r$$$. In this operation, you can reverse the order of the numbers on board $$$B$$$. For example, $$$\{1, 3, 0, 3\}$$$ becomes $$$\{3, 0, 3, 1\}$$$.
3.Operation $$$P$$$: This operation is denoted by the letter $$$p$$$. In this operation, you can take the first number from $$$A$$$ and push it to the end of $$$B$$$. For instance, if $$$A = \{1,3,3\}$$$ and $$$B = \{1,2,2\}$$$ before, then after performing the operation $$$P$$$ one time, $$$A = \{3,3\}$$$ and $$$B = \{1,2,2,1\}$$$.
The scientists decided to hold a tournament to popularize the game and find the people with the highest IQ. They have also agreed to give a big prize to each person of the tournament that successfully wins a game.
The tournament consists of $$$T$$$ CRP games. In each of the $$$T$$$ games, only one player is chosen and allowed to play the game. If he wins the game, he gets a big prize and a chance to meet with the scientists; otherwise, he doesn't get anything.
Let the string $$$S_i$$$ denote the sequence of operations $$$(c,r,p)$$$ with the smallest length, such that after performing the respective operations, the player currently chosen to play wins the $$$i$$$-th game.
Your task is to find and print $$$S_i$$$ for each $$$1 \le i \le T$$$.
If there exists more than one possible $$$S_i$$$ with the same length, then you need to find the lexicographically smallest one.
The first line contains two integers $$$T$$$ $$$(1 \le T \le 20)$$$ and $$$N$$$ $$$(1 \le N \le 10^5)$$$, denoting the total number of games in the tournament and the length of the sequence given in each game, respectively.
Each of the next $$$Τ$$$ lines contains $$$N$$$ space-separated integers $$$A_i$$$, where $$$A_i \in \{0,1,2,3\}$$$, the sequence written on board $$$A$$$ at the start of each of the $$$T$$$ games.
It is guaranteed that the sum of $$$N$$$ over all testcases does not exceed $$$10^5$$$.
For each of the $$$T$$$ games, print the sequence of operations $$$(c,r,p)$$$ with the smallest size, such that after performing the respective operations, the player currently chosen to play wins the game. If there exists more than one possible answer, then print the lexicographically smallest one.
6 51 3 1 0 21 1 3 0 20 3 3 0 32 1 1 3 21 0 3 0 11 1 3 1 3
pprppp ppppp pcppcpp pcpppp ppcppp pppcpp
It is guaranteed that there is always a possible sequence of movements to win the game, thus there is always an answer.
A player is said to win a game only if he can accomplish the goal of the game, which is to move all numbers from board $$$A$$$ to board $$$B$$$ using the least amount of operations described above, such that all numbers with equal values are adjacent to each other on board $$$B$$$.