After realizing that DMOJistan has the answers to next month's LCC questions, the army of the Incorporated States of MCPT has launched missiles at DMOJistan at random locations all in a by grid centered at in the hopes that the solution would be destroyed.
Unfortunately, none of them hit anything, and even worse, the head of the DMOJistan army sent back a taunting message detailing where each missile hit in relation to the solutions to the LCC problems represented as follows:
Umeaning that missile had a higher coordinate than the LCC solutions.
Dmeaning that missile had a lower coordinate than the LCC solutions.
Lmeaning that missile had a lower coordinate than the LCC solutions.
Rmeaning that missile had a higher coordinate than the LCC solutions.
The MCPT army only has one missile left, so this one can't miss. They decide to ask you the following:
What is the most probable location of the LCC solutions?
The first line will contain an integer , the number of missiles fired.
The next lines will contain a single character, the location of the missile in relation to the problem solutions.
It is guaranteed that there will be at least 1 missile on each side of the problem solutions.
Two lines, the first one containing the coordinate of the object, the second line containing the coordinate of the object. Your answer will be considered correct if it has an absolute or relative error of at most .
Sample Input 1
4 U D L R
Sample Output 1
Sample Input 2
7 U D L R U R U
Sample Output 2