Graphic editor "Chameleon"
The young programmist is learning the new graphic editor "Chameleon". This editor has an extraordinary simplicity. It supports exactly two colours - black and white, and one tool - "Chameleon".
The editor field is a square n × n cells. Cursor-chameleon is located on one of the cells of the field. It can be moved within the field in four directions - up, down, right or left exactly one cell. The cursor colour should always match the colour of the cell where it is located. For this, when it moves to a cell of a different colour, one of two events must occur: either the cursor changes its colour to the colour of this cell, or vice versa - the cell changes its colour to the colour of the cursor. For example, if the cursor moves from a black cell to a white one, either it should be recoloured in white, or the white cell where it is now located should become black. If the cell and the cursor have the same colour, then their colour does not change.
Initially, the cursor is black and located in the upper left cell of the field. This cell is also painted black. All other cells of the field are painted white.
Write a program to find the sequence of actions of the chameleon cursor, after which the picture specified in the input data will be obtained on the field.
Input
В первой строке задано число n (5 ≤ n ≤ 100) - размер поля. В следующих n строках описывается картинка, которую необходимо получить. Каждая строка описания картинки имеет длину n и состоит из символов "W", если соответствующая клетка белая, и "B", если чёрная.
The last line contains the test number.
Output
Print one line with the description of the desired sequence of actions.
Для обозначения перемещения влево, вверх, вправо или вниз с изменением цвета курсора следует использовать буквы "l", "u", "r" или "d" соответственно. Для обозначения перемещения влево, вверх, вправо или вниз с изменением цвета клетки следует использовать буквы "L", "U", "R" или "D" соответственно. Если курсор перемещается на клетку своего цвета, можно использовать как заглавную, так и строчную букву.