#include <bits/stdc++.h>
using namespace std;
const int mod = 997;
int n, m, AA[2010], BB[210][2010];
char A[2010][210], B[210][2010];
int main() {
  scanf("%d%d\n", &n, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%s\n", A[i] + 1);
    for (int j = 1; j <= m; ++j) AA[i] = (AA[i] + (A[i][j] - 97 + 1) * j) % mod;
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%s\n", B[i] + 1);
    for (int j = 1; j + m - 1 <= n; ++j) {
      int r = j + m - 1;
      for (int k = j, kk = 1; k <= r; ++k, ++kk)
        BB[i][j] = (BB[i][j] + (B[i][k] - 97 + 1) * kk) % mod;
    }
  }
  for (int q = 1; q + m - 1 <= n; ++q) {
    for (int g = 1; g + m - 1 <= n; ++g) {
      bool b = 1;
      for (int i = 1, j = q; i <= m; ++i, ++j)
        if (AA[j] != BB[i][g]) {
          b = 0;
          break;
        }
      if (b) {
        printf("%d %d\n", q, g);
        return 0;
      }
    }
  }
  return 0;
}
