def read_tsp(path):
    """ Read and parse TSP from given file path
    Args:
        path (string): location of *.tsp file
    Returns:
        data (dict): {city_index: {"x": xvalue, "y": yvalue}, ...}
    """
    data = {}

    with open(path, "r") as f:

        # Specification block
        for line in f:
            if line.strip() == "NODE_COORD_SECTION":
                break

        # Data block
        for line in f:
            line = line.strip()
            if line == "EOF":
                # End of data block
                break

            try:
                index, y, x = line.split(" ")
                data[int(index)] = {"x": float(x), "y": float(y)}
            except Exception as e:
                print(e)
                print("Can't parse data [{line}]")

        return data