# just a copy of http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=2232033#1
h, w = gets.split.map(&:to_i)
hw = []
h.times{|i|
  hw[i] = gets.chomp.split("").map(&:ord)
}
r, c = gets.split.map(&:to_i)
rc = []
r.times{|i|
  rc[i] = gets.chomp.split("").map(&:ord)
}
exit if r > h || c > w

A = 9999973
B = 950527

target = 0
r.times{|i|
  key = 0
  c.times{|j|
    key = key*B+rc[i][j]
  }
  target = target*A+key
}
C = B**c
t = Array.new(h){Array.new(w)}
t2 = Array.new(h){Array.new(w)}
h.times{|i|
  key = 0
  w.times{|j|
    key = key*B+hw[i][j];
    key -= hw[i][j-c]*C if j-c >= 0
    t[i][j] = key
    t2[i][j] = t[i][j]
  }
}

D = A**r

h.times{|i|
  w.times{|j|
    t[i][j] += t[i-1][j]*A if i > 0
    t[i][j] -= t2[i-r][j]*D if i-r >= 0
    if t[i][j] == target then
      if i-r+1 >= 0 && j-c+1>= 0 then
        puts "#{i-r+1} #{j-c+1}"
      end
    end
  }
}