The first line contains an integer~$n$,
the size of the hex ($2 \le n \le 500$).
The next $2 n - 1$ lines contain integers from~$1$ to~$99$
initially contained in the cells of the hex.
Each line contains space-separated integers: exactly as many
as the number of cells in the corresponding row of the hex.
Additionally, for ease of reading, these lines may contain
additional spaces before all numbers, between consecutive numbers,
and after all numbers.

The last line is the sequence of operations.
It has a length from~$1$ to~$250\,000$ characters
and consists of letters ``\texttt{T}'',~``\texttt{R}''~and~``\texttt{L}''.

The total size of the input, including spaces and line breaks,
does not exceed $2^{23}$~bytes.
