codeforces 851D Arpa and a list of numbers

NoSuchKey