Codeforces 295C Greg and Friends BFS

NoSuchKey