codeforces 295a Greg and Array

NoSuchKey