Wor is a plumbing repairman.
Wor often helps neighbors in the community to repair broken plumbing. With a high talent for fixing, Wor is confident in his capability. However, now he is facing trouble, as a serious accident happened in the central water supply station that interrupted the whole city's water supply. Because of the complexity of the pipe network, he failed and felt sad. Now, he is seeking your help. Can you help him?
There are four types of plumbing in the central water supply station. Now we define the operation $$$'$$$, which means a $$$90$$$ degree clockwise rotation of the water pipe.
When we do the operation $$$I'$$$, we can get the $$$-$$$-type pipe. Meanwhile, operation $$$-'$$$ can get the $$$I$$$-type pipe.
No matter how we use the operation $$$+'$$$, we can only get the $$$+$$$-type pipe.

Operation $$$p'$$$ would get the $$$q$$$-type water pipe, $$$q'$$$ would get the $$$d$$$-type water pipe, $$$d'$$$ would get the $$$b$$$-type water pipe, and $$$b'$$$ would get the $$$p$$$-type pipe.




Doing operation $$$x'$$$, we can get the $$$y$$$-type water pipe, and we can get the $$$x$$$-type pipe when we do the operation $$$y'$$$.


Starting tube and ending tube have only one direction, $$$u,o,l,r$$$, respectively representing the water flow out and in direction as up, down, left, or right. Attention please, starting tube and ending tube cannot rotate.
The order of following pictures stick to $$$u,r,o,l$$$.


In fact, distinguishing between starting tube and ending tube is meaningless, so there is no distinction between starting tube and ending tube in the data.
Now, Wor would give you the initial status of the plumbing matrix, which is an $$$n \times m$$$ matrix $$$a_{i,j}$$$. Your mission is to find a final fixed matrix $$$b_{i,j}$$$ that is available by only using the operation $$$'$$$ in the initial plumbing matrix, and the water flow can pass through from the starting tube to the ending tube.
The first line contains two integers $$$n,m(2 \le n,m \le 50)$$$ representing the size of the matrix as $$$n \times m$$$.
Then following $$$n$$$ lines and $$$m$$$ columns character matrix represent the initial status of the plumbing matrix $$$a_{i,j}(a_{i,j} \in \{i,+,p,x,u,o,l,r\})$$$.
The character $$$u,o,l,r$$$ represents the starting pipe or ending pipe direction. There must be two characters that are $$$u,o,l,r$$$, no matter which is the starting pipe or ending pipe.
We ensure that the total number of $$$p$$$-type pipes and $$$x$$$-type pipes is less than or equal to $$$20$$$.
An $$$n$$$ lines and $$$m$$$ columns character matrix represents the fixed status of the plumbing matrix $$$b_{i,j}(a_{i,j} \in \{i,-,+,p,b,d,q,x,y,u,o,l,r\})$$$ that can be obtained by only using the operation $$$'$$$ in the initial matrix, and the water flow can pass through from the starting tube to the ending tube.
5 7pppiipiiiupixlipi+piipipppiiiipiipi
pqp--qi iiup-xl ib-+qii b-qbdii iib--di
2 5riiiliiiii
r---l iiiii
3 3oiipipiiu
oii b-q iiu
5 2ox+x+x+xux
ox +x +x +x ux
There may be many legal solutions, you only need to output one of them.
The data ensures that there is a legitimate solution, so you don't need to consider situations where there is no solution.
Example 1 explanation:

| Name |
|---|


