modify distinct subsequences.