Solution for Bracket Matcher