Codeforces Round #598 (Div. 3) B. Minimize the Permutation

NoSuchKey