Solve bracket validator for easy cases.