CodeForces - 258D Little Elephant and Broken Sorting

NoSuchKey