This is the shortest possible sequence that contains each of the pairs.