The first line contains a single integer $T~(1\le T\le 10)$, which indicates the number of test cases. Then $T$ test cases follow.
For each test case, the first line contains $4$ integers $n,m,o$ and $l~(1\le n,m,o,l\le 1000)$ representing the number of rows, the number of columns, the number of broken grids and the length of Doc's command sequence.
Next $o$ lines, each line contains two integers $i$ and $j$ describing the position of broken grid.
The last line contains Doc's command sequence, it's a string of length $l$ with each character being one of $\{``U",``D",``L",``R"\}$ denoting Move Up, Move Down, Move Left and Move Right respectively.