def read_file(name):
    """
        Input the file name and return a dictionary to store the graph.
    """
    
    with open(name, 'r') as data:
        line = data.read().strip().split("\n")

    graph_dict = {}
    for element in line:
        line_list = list(map(int, element.strip().split("\t")))
        graph_dict[line_list[0]] = line_list[1:]
        
    return graph_dict