Codeforces Round #673 (Div. 2) F. Graph and Queries (并查集启发式合并&撤销)

NoSuchKey