I love Ira
Sasha wanted to make Ira a very unusual birthday gift. Romantic message posted with solved problems, on the most popular Ukrainian online judge. Problems on the site are in the form of a rectangular table, solved problems are highlighted in a pleasant green. This has suggested the idea to light in the table only those cells that would form a desired image or inscription...
Even if the shape of the message is strictly defined, its position in the table can be controlled. Of course, on the location of the signs depends set of tasks to be solved. So Sasha has assigned to each task a score - a integer from 0 to 9, and decided to location in such way, so that the sum of marks would be maximial. Text can be placed in a table anywhere, with only one limitation: inscription must entirely lie in the table.
Input
First line of the input file contain two integers R and C (1 ≤ R, C ≤ 800) — number of rows and columns in the table, respectively. In next R lines map of the problems is described. Each line has exactly C digits - score for corresponding tasks. The score for the task is measured by the integer from 0 to 9. The next line gives two numbers H (1 ≤ H ≤ R) and W (1 ≤ W ≤ C) — height and width of the inscription, respectively. In next H lines template of the inscription is given. Each line consists of W characters: ’#’ means that the problem needs to be solved, ’.’ means that the problem should not be solved.
Output
Print the maximum sum of scores for solved problems.