- Time limit: 1.00 s
- Memory limit: 512 MB
Given an grid and two squares and , create a path from to that visits each square exactly once.
For example, here is a path from to in a grid:
Input
The first input line has an integer : the number of tests.
After this, there are lines that describe the tests. Each line has six integers , , , , and .
In all tests and . In addition, or .
Output
Print YES, if it is possible to construct a path, and NO otherwise.
If there is a path, also print its description which consists of characters U
(up), D
(down), L
(left) and R
(right). If there are several paths, you can print any of them.
Constraints
Example
Input:
5 1 3 1 1 1 3 1 3 1 2 1 3 2 2 1 1 2 2 2 2 1 1 2 1 4 7 1 3 3 6
Output:
YES RR NO NO YES RDL YES RRRRDDDLLLLLLUUURDDRURDRURD