Dasha is fond of challenging puzzles: Rubik's Cube 3 × 3 × 3, 4 × 4 × 4, 5 × 5 × 5 and so on. This time she has a cyclic table of size n × m, and each cell of the table contains a lowercase English letter. Each cell has coordinates (i, j) (0 ≤ i < n, 0 ≤ j < m). The table is cyclic means that to the right of cell (i, j) there is the cell <image>, and to the down there is the cell <image>.

Dasha has a pattern as well. A pattern is a non-cyclic table of size r × c. Each cell is either a lowercase English letter or a question mark. Each cell has coordinates (i, j) (0 ≤ i < r, 0 ≤ j < c).

The goal of the puzzle is to find all the appearance positions of the pattern in the cyclic table.

We say that the cell (i, j) of cyclic table is an appearance position, if for every pair (x, y) such that 0 ≤ x < r and 0 ≤ y < c one of the following conditions holds: 

  * There is a question mark in the cell (x, y) of the pattern, or 
  * The cell <image> of the cyclic table equals to the cell (x, y) of the pattern. 



Dasha solved this puzzle in no time, as well as all the others she ever tried. Can you solve it?.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 400) — the cyclic table sizes.

Each of the next n lines contains a string of m lowercase English characters — the description of the cyclic table.

The next line contains two integers r and c (1 ≤ r, c ≤ 400) — the sizes of the pattern.

Each of the next r lines contains a string of c lowercase English letter and/or characters '?' — the description of the pattern.

Output

Print n lines. Each of the n lines should contain m characters. Each of the characters should equal '0' or '1'.

The j-th character of the i-th (0-indexed) line should be equal to '1', in case the cell (i, j) is an appearance position, otherwise it should be equal to '0'.

Examples

Input

5 7
qcezchs
hhedywq
wikywqy
qckrqzt
bqexcxz
3 2
??
yw
?q


Output

0000100
0001001
0000000
0000000
0000000


Input

10 10
fwtoayylhw
yyaryyjawr
ywrdzwhscy
hnsyyxiphn
bnjwzyyjvo
kkjgseenwn
gvmiflpcsy
lxvkwrobwu
wyybbcocyy
yysijsvqry
2 2
??
yy


Output

1000100000
0000000001
0001000000
0000010000
0000000000
0000000000
0000000000
0100000010
1000000001
0000010000


Input

8 6
ibrgxl
xqdcsg
okbcgi
tvpetc
xgxxig
igghzo
lmlaza
gpswzv
1 4
gx??


Output

000100
000001
000000
000000
010001
000000
000000
000000
#include <bits/stdc++.h>
#pragma GCC optimize(3)
using namespace std;
bool Finish_read;
template <class T>
inline void read(T &x) {
  Finish_read = 0;
  x = 0;
  int f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    if (ch == EOF) return;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  x *= f;
  Finish_read = 1;
}
template <class T>
inline void print(T x) {
  if (x / 10 != 0) print(x / 10);
  putchar(x % 10 + '0');
}
template <class T>
inline void writeln(T x) {
  if (x < 0) putchar('-');
  x = abs(x);
  print(x);
  putchar('\n');
}
template <class T>
inline void write(T x) {
  if (x < 0) putchar('-');
  x = abs(x);
  print(x);
}
const int maxn = 405, alphabet = 26;
bitset<maxn> vis[alphabet][maxn], ans[maxn];
int n, m, r, c;
char now[maxn];
inline int fix(int p, int mod) {
  while (p < 0) p += mod;
  while (p >= mod) p -= mod;
  return p;
}
int main() {
  read(n), read(m);
  for (int i = 0; i < n; ++i) {
    scanf("%s", now);
    for (int j = 0; j < m; ++j) vis[now[j] - 'a'][i][j] = 1;
  }
  for (int i = 0; i < n; ++i) ans[i].set();
  read(r), read(c);
  for (int i = 0; i < r; ++i) {
    scanf("%s", now);
    for (int j = 0; j < c; ++j) {
      if (now[j] == '?') continue;
      int p = now[j] - 'a', plsx = fix(-i, n), plsy = fix(-j, m);
      for (int k = 0; k < n; ++k) {
        int px = k + plsx;
        if (px >= n) px -= n;
        ans[px] &= (vis[p][k] >> (m - plsy)) | (vis[p][k] << plsy);
      }
    }
  }
  for (int i = 0; i < n; ++i, puts(""))
    for (int j = 0; j < m; ++j) printf("%d", ans[i][j] ? 1 : 0);
  return 0;
}
