def extract_arguments(fh):
    N = int(fh.readline().strip())
    S = [fh.readline().strip() for _ in range(N)]
    Q = int(fh.readline().strip())
    queries = []
    for _ in range(Q):
        line = fh.readline().strip().split()
        k_i = int(line[0])
        p_i = line[1]
        queries.append((k_i, p_i))
    return N, S, Q, queries