Restored search of minimal lexicographic representative using partitions.