fixed bracket matching problem