def extract_arguments(fh):
    cases = []
    while True:
        line = fh.readline().strip()
        if not line:
            break
        N, M = map(int, line.split())
        edges = []
        for _ in range(M):
            s, t = map(int, fh.readline().strip().split())
            edges.append((s, t))
        cases.append((N, M, edges))
    return cases

# if __name__ == "__main__":
#     input_path = sys.argv[1]
#     with open(input_path, 'r') as fh: 
#         cases = extract_arguments(fh)