A - Permutations CodeForces - 124B

NoSuchKey