Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) A

NoSuchKey