#include <bits/stdc++.h>
using namespace std;
int N, M;
string MA[2005], MB[205];
long long HA[2005], HB[2005];
bool chk(int r, int c) {
  for (int i = 0; i <= M - 1; i++)
    for (int j = 0; j <= M - 1; j++)
      if (MA[r + i][j] != MB[i][c + j]) return false;
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> M;
  for (int i = 0; i <= N - 1; i++) cin >> MA[i];
  for (int i = 0; i <= M - 1; i++) cin >> MB[i];
  for (int r = 0; r <= N - M; r++) {
    for (int i = 0; i <= M - 1; i++)
      for (int j = 0; j <= M - 1; j++)
        HA[r] = (HA[r] * 26 + (int)(MA[r + i][j] - 'a')) % 1000000007;
  }
  for (int c = 0; c <= N - M; c++) {
    for (int i = 0; i <= M - 1; i++)
      for (int j = 0; j <= M - 1; j++)
        HB[c] = (HB[c] * 26 + (int)(MB[i][c + j] - 'a')) % 1000000007;
  }
  for (int r = 0; r <= N - 1; r++)
    for (int c = 0; c <= N - 1; c++)
      if (HA[r] == HB[c])
        if (chk(r, c)) {
          cout << r + 1 << ' ' << c + 1 << '\n';
          return 0;
        }
  return 0;
}
