Exercise. Checking syntax for mismatching parentheses.