def extract_arguments(fh):
    n, q = map(int, fh.readline().strip().split())
    queries = []
    for _ in range(q):
        query = list(map(int, fh.readline().strip().split()))
        queries.append(query)
    return n, q, queries