Hovercraft

아직 제출이 없습니다시간 제한5초메모리 제한256 MB

문제

You are controlling a hovercraft. Hovercraft is located on a secret base. This base is divided into n×mn \times m sectors. Rows are numbered with consecutive integers from 11  to nn (from top to bottom), columns --- from 11 to mm (from left to right). Each sector is either empty or occupied with a wall. Also, there are kk commutators located at some empty sectors. There is no sector with more than one commutator in it. Each commutator can be either enabled or disabled.

You need to make a list of 1212 commands to the hovercraft, and it will execute these commands one by one in the same order. Each of these commands should be one of a following type:

  • U --- move up: move from sector [rr, cc] to sector [r1r - 1, cc];
  • D --- move down: move from sector [rr, cc] to sector [r+1r + 1, cc];
  • L --- move left: move from sector [rr, cc] to sector [rr, c1c - 1];
  • R --- move right: move from sector [rr, cc] to sector [rr, c+1c + 1];
  • S --- switch commutator state: enable commutator if it was disabled, and disable otherwise;
  • F --- call function: execute a predefined list of 88 commands one by one;
  • N --- no operation: just do nothing.

Hovercraft ignores movement operation if it is impossible to perform it without hitting a wall or violating the secret base borders.

Hovercraft ignores switching operation if there is no commutator in the current cell.

Each function call has the same list of commands, and it is also composed by you. This list should contain exactly 88 commands of the above types. It means that the function can be called recursively.

You goal is to make all kk commutators enabled at some moment of time. That means you task is to compose a list of 1212 commands and a function of 88 commands to make hovercraft enable all kk commutators at the same time. It does not matter what will happen after this moment of time: hovercraft can move indefinitely or even disable some commutators.

입력

The first line of input contains three integers nn, mm and kk --- the number of rows and columns of the secret base and the number of commutators respectively (2n,m202 \leq n, m \leq 20, 1k51 \leq k \leq 5).

The second line of input contains two integers x_sx\_{s} and y_sy\_{s} --- row and column number of the initial hovercraft position (1x_sn1 \leq x\_{s} \leq n, 1y_sm1 \leq y\_{s} \leq m).

Each of the following nn lines denotes a row of the secret base and contains mm characters. Each character is either '.' (empty sector), 'X' (sector with wall), 'E' (enabled commutator) or 'D' (disabled commutator).

It is guaranteed that the hovercraft starts in a sector without a wall, and also that at least one valid answer exists for the given input.

출력

The first line of output should contain exactly 88 characters denoting commands of function.

The second line of output should contain exactly 1212 characters denoting the main list of commands.

Each of these characters should be either 'U', 'D', 'L', 'R', 'S', 'F' or 'N'.

If there are several possible answers, output any one of them.

힌트

There is no need to use function in the second sample. In this case the function can be composed of arbitrary commands.

After performing the second function call of the third sample, all the commutators are enabled. That is why the output is correct despite the fact that the last command disables one of the commutators.