Codeforces #1063C Dwarves, Hats and Extrasensory Abilities

NoSuchKey