import sys

t = int(sys.stdin.readline())
h = [list(sys.stdin.readline()) for _ in range(t)]
cnt = 0
apt = []

import sys

t = int(sys.stdin.readline())
h = [list(sys.stdin.readline()) for _ in range(t)]
cnt = 0
apt = []
