#D11814. Bombing

    ID: 9827 Type: Default 2000ms 536MiB

Bombing

Bombing

Problem Statement

JAG land is a country, which is represented as an M×MM \times M grid. Its top-left cell is (1,1)(1, 1) and its bottom-right cell is (M,M)(M, M).

Suddenly, a bomber invaded JAG land and dropped bombs to the country. Its bombing pattern is always fixed and represented by an N×NN \times N grid. Each symbol in the bombing pattern is either X or .. The meaning of each symbol is as follows.

  • X: Bomb
  • .: Empty

Here, suppose that a bomber is in (br,bc)(br, bc) in the land and drops a bomb. The cell (br+i1,bc+j1)(br + i - 1, bc + j - 1) will be damaged if the symbol in the ii-th row and the jj-th column of the bombing pattern is X (1i,jN1 \le i, j \le N).

Initially, the bomber reached (1,1)(1, 1) in JAG land. The bomber repeated to move to either of 44-directions and then dropped a bomb just LL times. During this attack, the values of the coordinates of the bomber were between 11 and MN+1M - N + 1, inclusive, while it dropped bombs. Finally, the bomber left the country.

The moving pattern of the bomber is described as LL characters. The ii-th character corresponds to the ii-th move and the meaning of each character is as follows.

  • U: Up
  • D: Down
  • L: Left
  • R: Right

Your task is to write a program to analyze the damage situation in JAG land. To investigate damage overview in the land, calculate the number of cells which were damaged by the bomber at least KK times.


Input

The input consists of a single test case in the format below.

NN MM KK LL B1B_{1} \vdots BNB_{N} SS

The first line contains four integers NN, MM, KK and LL(1N<M5001 \le N < M \le 500, 1KL2×1051 \le K \le L \le 2 \times 10^{5}). The following NN lines represent the bombing pattern. BiB_i is a string of length NN. Each character of BiB_i is either X or .. The last line denotes the moving pattern. SS is a string of length LL, which consists of either U, D, L or R. It's guaranteed that the values of the coordinates of the bomber are between 11 and MN+1M - N + 1, inclusive, while it drops bombs in the country.

Output

Print the number of cells which were damaged by the bomber at least KK times.

Examples

Input Output

2 3 2 4 XX X. RDLU

|

3

7 8 3 5 .XXX.X. X..X.X. ...XX.X XX.XXXX ..XXXX. X.X.... ..XXXXX DRULD

|

26

Example

Input

Output

inputFormat

Input

The input consists of a single test case in the format below.

NN MM KK LL B1B_{1} \vdots BNB_{N} SS

The first line contains four integers NN, MM, KK and LL(1N<M5001 \le N < M \le 500, 1KL2×1051 \le K \le L \le 2 \times 10^{5}). The following NN lines represent the bombing pattern. BiB_i is a string of length NN. Each character of BiB_i is either X or .. The last line denotes the moving pattern. SS is a string of length LL, which consists of either U, D, L or R. It's guaranteed that the values of the coordinates of the bomber are between 11 and MN+1M - N + 1, inclusive, while it drops bombs in the country.

outputFormat

Output

Print the number of cells which were damaged by the bomber at least KK times.

Examples

Input Output

2 3 2 4 XX X. RDLU

|

3

7 8 3 5 .XXX.X. X..X.X. ...XX.X XX.XXXX ..XXXX. X.X.... ..XXXXX DRULD

|

26

Example

Input

Output

样例