The children at SuperKids kindergarten are playing a word game on a rectangular field of size $m \times n$ divided into a grid of unit squares. The rows are numbered from 1 to $m$ from top to bottom, and the columns are numbered from 1 to $n$ from left to right. The cell at the intersection of row $i$ and column $j$ is called cell $(i, j)$ and contains exactly one uppercase letter $a_{ij}$. Each child is given a string $S$ of length $k$ consisting only of uppercase letters. The child can choose a starting cell and play the game over multiple turns. In each turn, the child must move to one of the four adjacent cells, and then they can write down exactly one letter that matches the letter in the cell they moved to, if they want. The goal of the child is to write down the given string $S$. Note that the letters must be written in the exact order as in the string $S$, and only one letter can be written when reaching a cell.
Requirement: Help the child achieve their goal in the game with the minimum number of moves. Indicate the number of moves according to the found solution.
### Input
- The first line contains three positive integers $m,n,k$ $(2 \le m,n,k \le 300)$ separated by spaces.
- The second line contains the string $S$ consisting of exactly $k$ consecutive uppercase letters.
- The next $m$ lines, the $i$-th line contains $n$ consecutive uppercase letters, where the $j$-th letter is $a_{ij}$.
The input ensures that every character in the string $S$ appears in at least one cell of the grid.
### Output
- Print a single integer which is the minimum number of moves the child needs to make to achieve the goal of the game.
### Constraints
- Subtask 1 ($30$% of the points): $m, n, k \le 4$
- Subtask 2 ($30$% of the points): $m, n, k \le 100$
- Subtask 3 ($40$% of the points): No additional constraints beyond those stated in the problem.
### Example
Input:
```
2 4 6
DHDBBB
DHAB
ABBD
```
Output:
```
7
```