codeforces 889B. Restoration of string(拓扑排序)

NoSuchKey