def extract_arguments(fh):
    S = fh.readline().strip()
    N = int(fh.readline().strip())
    operations = []
    for _ in range(N):
        L, R = map(int, fh.readline().strip().split())
        operations.append((L, R))
    return S, N, operations