Add SequencePair and modify Greedy algorithm to support