autopattern: always chose the lexicographical first one if there are two pattern...