PROGRAMMING:Is it the same binary search tree
Determine whether the two sequences are the same binary search tree sequence.
###Input format:
Start a number 'n', (1 < = n < = 20) indicates that there are 'n' sequences to judge, and when 'n = 0', enter the end.
The next line is a sequence. The length of the sequence is less than '10', and contains the number of '(0 ~ 9'). There are no duplicate numbers. According to this sequence, a binary search tree can be constructed.
The next 'n' row has' n 'sequences, and the format of each sequence is the same as the first one. Please judge whether these two sequences can form the same binary search tree.
###Output format:
If the sequence is the same, output 'yes', otherwise output' no '.
###Input example:
```in
six
forty-five thousand and twenty-one
twelve thousand and forty-five
fifty-four thousand one hundred and twenty
forty-five thousand and twenty-one
forty-five thousand and twelve
twenty-one thousand and fifty-four
fifty thousand four hundred and twelve
0
```
###Output example:
```out
NO
NO
YES
NO
NO
NO
```
answer:If there is no answer, please comment
###Input format:
Start a number 'n', (1 < = n < = 20) indicates that there are 'n' sequences to judge, and when 'n = 0', enter the end.
The next line is a sequence. The length of the sequence is less than '10', and contains the number of '(0 ~ 9'). There are no duplicate numbers. According to this sequence, a binary search tree can be constructed.
The next 'n' row has' n 'sequences, and the format of each sequence is the same as the first one. Please judge whether these two sequences can form the same binary search tree.
###Output format:
If the sequence is the same, output 'yes', otherwise output' no '.
###Input example:
```in
six
forty-five thousand and twenty-one
twelve thousand and forty-five
fifty-four thousand one hundred and twenty
forty-five thousand and twenty-one
forty-five thousand and twelve
twenty-one thousand and fifty-four
fifty thousand four hundred and twelve
0
```
###Output example:
```out
NO
NO
YES
NO
NO
NO
```
answer:If there is no answer, please comment