h, w = gets.split.map(&:to_i)
hw = []
h.times{|i|
  hw[i] = gets.chomp
}
rc_hash = {}
r, c = gets.split.map(&:to_i)
exit if r > h || c > w

hash = Hash.new { |ha,k| ha[k] = [] }

if r <= c then
  rc = []
  r.times{|i|
    rc[i] = gets.chomp
    rc_hash[rc[i]] = 0 unless rc_hash[rc[i]]
    rc_hash[rc[i]] += 1
  }

  idx = rc.index(rc_hash.min {|a, b| a[1] <=> b[1] }[0])

  idx.upto(h-r-idx){|i|
    0.upto(w-c){|j|
      hash[hw[i][j,c]] << "#{i} #{j}"
    }
  }
  key = rc[idx]
  if hash[key] then
    hash[key].each{|ij|
      i, j = ij.split.map(&:to_i)
      ans = true
      r.times{|k|
        unless hw[i-idx+k][j,c] == rc[k] then
          ans = false
          break
        end
      }
      puts "#{i-idx} #{j}" if ans
    }
  end
 else
   #transpose mode
  mat = Array.new(w){Array.new(h)}
  h.times{|i|
    tmp = hw[i].split("")
    w.times{|j|
      mat[j][i] = tmp[j]
    }
  }
  wh = []
  w.times{|j|
    wh[j] = mat[j].join
  }
  mat = Array.new(c){Array.new(r)}
  r.times{|i|
    tmp = gets.chomp.split("")
    c.times{|j|
      mat[j][i] = tmp[j]
    }
  }
  cr_hash = {}
  cr = []
  c.times{|j|
    cr[j] = mat[j].join
    cr_hash[cr[j]] = 0 unless cr_hash[cr[j]]
    cr_hash[cr[j]] += 1
  }
  idx = cr.index(cr_hash.min {|a, b| a[1] <=> b[1] }[0])
  key = cr[idx]
  0.upto(h-r){|i|
    idx.upto(w-c+idx){|j|
      hash[wh[j][i,r]] << "#{i} #{j}"
    }
  }
  if hash[key] then
    hash[key].each{|ij|
      i, j = ij.split.map(&:to_i)
      ans = true
      c.times{|k|
        unless wh[j-idx+k][i,r] == cr[k] then
          ans = false
          break
        end
      }
      puts "#{i} #{j-idx}" if ans
    }
  end
end