Educational Codeforces Round 166 (Rated for Div. 2) D. Invertible Bracket Sequences Code : Invertible Bracket Sequences