| Asu Coding Cup 4 |
|---|
| Закончено |
Tahhan was hungry, so AbuTahun decided to show him the way to Rakan's cafeteria.
AbuTahun gave Tahhan a string consisting only of the letters ('L','R','U','D'), denotes the path to the cafeteria.
Tahhan located at point $$$(x,y)$$$, and he wants to go to the cafeteria.
Can you tell Tahhan where Rakan's cafeteria is?
first line of input consists of two integers $$$x,y$$$ $$$(1 \leq x,y \leq 100)$$$ , denotes the starting point.
the second line consists of string $$$s$$$ $$$(1 \leq |s| \leq 100)$$$ denotes the path to the cafeteria .
print two integers which denotes the ending point.
*Note* the answer could contains a negative integer.
5 3 UUUDLRLRLRR
6 5
| Название |
|---|


