def extract_arguments(fh):
    N, F = map(int, fh.readline().strip().split())
    info = []
    for _ in range(N):
        line = fh.readline().strip().split()
        M = int(line[0])
        items = line[1:]
        info.append((M, items))
    return N, F, info