cf #598 B. Minimize the Permutation

NoSuchKey