#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 2;
const long long pr = 997;
const int mod = 1e9 + 7;
int n, m;
long long hs[202][N], ar[N], pw[N];
string a[N], b[N], s;
long long get(int l, int r, int k) {
  long long h = (hs[k][r] - hs[k][l - 1] + mod) % mod;
  h = (h * pw[N - l]) % mod;
  return h;
}
int main() {
  pw[0] = pr;
  for (int i = 1; i < N; i++) pw[i] = (pw[i - 1] * pr) % mod;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i] = ' ' + a[i];
    long long h = 0;
    for (int j = 1; j <= m; j++) {
      h = (h + (a[i][j] * pw[j]) % mod) % mod;
    }
    ar[i] = h;
    ar[i] = (ar[i] * pw[N - 1]) % mod;
  }
  for (int i = 1; i <= m; i++) {
    cin >> b[i];
    b[i] = ' ' + b[i];
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      hs[i][j] = (hs[i][j - 1] + (b[i][j] * pw[j]) % mod) % mod;
    }
  }
  for (int i = 1; i <= n - m + 1; i++) {
    for (int j = 1; j <= n - m + 1; j++) {
      int fl = 1;
      for (int k = 1; k <= m; k++) {
        if (ar[i + k - 1] != get(j, j + m - 1, k)) fl = 0;
        if (!fl) break;
      }
      if (fl) {
        cout << i << " " << j << endl;
        return 0;
      }
    }
  }
}
