B = 101
DIV = 1<<32
def rolling_hash(s, n)
  hash = Array.new(n+1)
  hash[0] = 0
  n.times{ |i| hash[i+1] = (hash[i]*B + s[i].ord) % DIV }
  hash
end

def init(r, c)
  f = Array.new(r)
  r.times do |i|
    f[i] = rolling_hash(gets.chomp, c)
  end
  f
end

def check(i, j)
  $r.times do |y|
    return if ($f1[i+y][j+$c] - $f1[i+y][j]*$p[$c]) % DIV != $f2[y][$c]
  end
  puts "#{i} #{j}" 
end

h, w = gets.split.map(&:to_i)

$p = Array.new(w+1)
$p[0] = 1
w.times{ |i| $p[i+1] = $p[i]*B % DIV }

$f1 = init(h, w)
$r, $c = gets.split.map(&:to_i)
$f2 = init($r, $c)
(0..h-$r).each do |i|
  (0..w-$c).each do |j|
    check(i, j)
  end
end