   f = Array.new()
    a = Array.new()
    b = Array.new()
    h.times do |i|
        f[i] = gets.chomp
        if f[i].include?("A")
            a[0] = i
            a[1] = f[i].index("A")
        end
        if f[i].include?("B")
            b[0] = i
            b[1] = f[i].index("B")
        end
    end