#D11646. Pattern Search

    ID: 9683 Type: Default 3000ms 268MiB

Pattern Search

Find places where a R × C pattern is found within a H × W region. Print top-left coordinates (i, j) of sub-regions where the pattern found. The top-left and bottom-right coordinates of the region is (0, 0) and (H-1, W-1) respectively.

Constraints

  • 1 ≤ H, W ≤ 1000
  • 1 ≤ R, C ≤ 1000
  • The input consists of alphabetical characters and digits

Input

In the first line, two integers H and W are given. In the following H lines, i-th lines of the region are given.

In the next line, two integers R and C are given. In the following R lines, i-th lines of the pattern are given.

Example

Input

4 5 00010 00101 00010 00100 3 2 10 01 10

Output

0 3 1 2

inputFormat

input consists of alphabetical characters and digits

Input

In the first line, two integers H and W are given. In the following H lines, i-th lines of the region are given.

In the next line, two integers R and C are given. In the following R lines, i-th lines of the pattern are given.

Example

Input

4 5 00010 00101 00010 00100 3 2 10 01 10

outputFormat

Output

0 3 1 2

样例

4 5
00010
00101
00010
00100
3 2
10
01
10
0 3

1 2

</p>