codeforces 985C. Liebig's Barrels

NoSuchKey