MegaMaid is a robot whose function is to move through a matrix and clean all of its dirty cells. It's positioned in some cell of an matrix of dirty (d) and clean (-) cells. It can perform five types of operations:

  • LEFT: Move one cell to the left.
  • RIGHT: Move one cell to the right.
  • UP: Move one cell up.
  • DOWN: Move one cell down.
  • CLEAN: Clean the cell.

Given the robot's current location and the configuration of dirty and clean cells in the matrix, print the next operation MegaMaid will perform (e.g., UP, CLEAN, etc.) on a new line.

Input Format

The first line contains two space-separated integers describing the respective (row) and (column) coordinates of MegaMaid's initial location.
The second line contains two space-separated integers describing the respective height, , and width, , of the matrix.
Each line of the subsequent lines contains a string of characters describing row in the matrix; each character describes the character at location according to the following key:

  • b denotes MegaMaid's location (in a clean cell).
  • d denotes a dirty cell.
  • - denotes a clean cell.

Note: If MegaMaid is initially located in a dirty cell, the cell will be marked with a d (not a b).

Constraints

Output Format

Print the next operation MegaMaid will perform (i.e., LEFT, RIGHT, UP, DOWN, CLEAN). It's important to only print the next operation, because your program will be called iteratively after performing each operation.

Sample Input

0 0
5 5
b---d
-d--d
--dd-
--d--
----d

Sample Output

RIGHT

Explanation

MegaMaid's next move would be to move RIGHT, resulting in the following next state:

-b--d
-d--d
--dd-
--d--
----d
  1. Challenge Walkthrough
    Let's walk through this sample challenge and explore the features of the code editor.1 of 6
  2. Review the problem statement
    Each challenge has a problem statement that includes sample inputs and outputs. Some challenges include additional information to help you out.2 of 6
  3. Choose a language
    Select the language you wish to use to solve this challenge.3 of 6
  4. Enter your code
    Code your solution in our custom editor or code in your own environment and upload your solution as a file.4 of 6
  5. Test your code
    You can compile your code and test it for errors and accuracy before submitting.5 of 6
  6. Submit to see results
    When you're ready, submit your solution! Remember, you can go back and refine your code anytime.6 of 6
  1. Check your score