codeforces 508E Arthur and Brackets

NoSuchKey