'Sort the values in-place based on the connectors in the network.'

def sort(self, values):

    for level in self:
        for (wire1, wire2) in level:
            if (values[wire1] > values[wire2]):
                (values[wire1], values[wire2]) = (values[wire2], values[wire1])
