J. There
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Veronika really likes to visit shops because there are a lot of different colorful items. Arriving at the shop, Veronica first asks her dad to pick her up. As soon as Veronica is picked up, she immediately begins to command where to go. To do this, Veronica points her finger in the direction to go and says the word «there». Dad, of course, is happy to carry Veronica in his arms and goes in the direction shown by Veronica, but only until he meets an obstacle in the form of another customer, a shelf, or a wall.

For simplification, the shop can be represented as a rectangular matrix of size $$$n \times m$$$. Each cell of the shop can be empty and marked with the symbol «.», or occupied «#». Initially, Veronica is in the Dad's arms in the bottom left cell with coordinates $$$x$$$ equal to 1 and $$$y$$$ equal to 1. Veronica can show one of the four directions in letters, setting the movement: «U»  — increasing the coordinates of $$$x$$$, «D»  — decrease of the $$$x$$$ coordinate, «R»  — increase of the $$$y$$$ coordinate, «L»  — decrease of the $$$y$$$ coordinate.

Find the coordinates of Veronica and her dad after following all the instructions.

Input

The first line contains two integers $$$n$$$, $$$m$$$$$$(1\leq n,m\leq 1000)$$$  — the size of the shop.

Next, $$$n$$$ lines are given, each has $$$m$$$ characters. All lines consist of the characters «.»  — the cell is empty, «#»  — the cell is occupied.

The last line of input contains a single line $$$s$$$, consisting of the characters «D», «U», «L», «R», denoting Veronica's commands. The length of the line $$$s$$$ does not exceed $$$2 \cdot 10^6$$$.

Output

In a single line, print the final coordinates of the cell in which Veronica is located.

Examples
Input
4 4
....
....
....
....
DRLU
Output
1 4
Input
4 4
....
...#
....
....
DRUL
Output
1 2
Input
5 6
#..#..
#..#..
......
##..#.
....#.
RURD
Output
6 1