B. Nirvana(Codeforces Round #549 (Div. 2))

NoSuchKey