codeforces 1037F. Maximum Reduction(启发式合并)

NoSuchKey