We have three types of brackets: "()", "[]", and "{}". We are now interested in some special strings. A string is special if all the following conditions hold:
Each character of the string is one of the six bracket characters mentioned above.
The characters of the string can be divided into disjoint pairs such that in each pair we have an opening bracket and a closing bracket of the same type.
For each pair, the opening bracket must occur to the left of the corresponding closing bracket.
For each pair, the substring strictly between the opening and the closing bracket must be a special string (again, according to this definition).
For example, the empty string is a special string: there are 0 pairs of brackets.
The string "[]" is also a special string: there is one pair of matching brackets, they are in the proper order, and the string between them (which is the empty string) is a special string.
Now give you a string ,your task is to judge whether it is a special string.(The string may contains ‘X’,and we can change each 'X' into one of the brackets, the number of X is at most 10)