def read_instance(filea):
    """
    Read the instance file
    :param filea: Instance file
    :return: Return a tuple with 3 elements(list of vertices 1, list of vertices 2,and list of colors)
    """

    with open(filea, "r") as myfile:
        next(myfile)
        next(myfile)
        next(myfile)
        next(myfile)
        data = myfile.readlines()

    lst_aux = [j.rstrip() for j in data]
    lst_split = [i.split() for i in lst_aux]
    v1 = []
    v2 = []
    color = []
    for i in lst_split:
        v1.append(int(i[0]))
        v2.append(int(i[1]))
        color.append(int(i[2]))
    return v1, v2, color