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

exit if r > h || c > w
if r > c then
  h, w = w, h
  hw = hw.transpose
  r, c = c, r
  rc = rc.transpose
  0.upto(w-c){|j|
    0.upto(h-r){|i|
      if hw[i][j,c] == rc[0] then
        flag = true # it is candidate
        (1).upto(r-1){|k|
          unless hw[i+k][j,c] == rc[k] then
            flag = false
            break
          end
        }
        puts "#{j} #{i}" if flag
      end
    }
  }
else
  0.upto(h-r){|i|
    0.upto(w-c){|j|
      if hw[i][j,c] == rc[0] then
        flag = true # it is candidate
        (1).upto(r-1){|k|
          unless hw[i+k][j,c] == rc[k] then
            flag = false
            break
          end
        }
        puts "#{i} #{j}" if flag
      end
    }
  }
end