Codeforces 500B New Year Permutation [贪心]

NoSuchKey