Exercise 2: Parentheses Balancing