PROGRAMMING:Isomorphism of trees
Given two trees T1 and T2. If T1 can be changed into T2 by several times of left and right child exchange, then we call two trees "isomorphic". For example, the two trees shown in Figure 1 are isomorphic, because after we exchange the left and right children of nodes a, B and g of one tree, we get another tree. And Figure 2 is not isomorphic.

Figure 1

Figure 2
Now, given two trees, please judge whether they are isomorphic.
###Input format:
Input the information of 2 binary trees. For each tree, we first give a non negative integer $$n $$($$Le 10 $$) in a row, that is, the number of nodes of the tree (assuming that nodes are numbered from 0 to $$n-1 $); Next, the $$n $$line, the $$I $$line corresponding to the number of the $$I $$node, gives the number of one English capital letter stored in the node, the number of the left child node, and the number of the right child node. If the child node is empty, the corresponding position is given with "'". The given data is separated by a space. Note: the title ensures that the letters stored in each node are different.
###Output format:
If two trees are isomorphic, output "yes", otherwise output "no".
###Enter sample 1 (corresponding to figure 1)
```in
eight
A 1 2
B 3 4
C 5 -
D - -
E 6 -
G 7 -
F - -
H - -
eight
G - 4
B 7 6
F - -
A 5 1
H - -
C 0 -
D - -
E 2 -
```
###Output sample 1:
```out
Yes
```
###Enter sample 2 (corresponding to figure 2)
```
eight
B 5 7
F - -
A 0 3
C 6 -
H - -
D - -
G 4 -
E 1 -
eight
D 6 -
B 5 -
E - -
H - -
C 0 2
G - 3
F - -
A 1 4
```
###Output sample 2:
```
No
```
answer:If there is no answer, please comment
Figure 1

Figure 2
Now, given two trees, please judge whether they are isomorphic.
###Input format:
Input the information of 2 binary trees. For each tree, we first give a non negative integer $$n $$($$Le 10 $$) in a row, that is, the number of nodes of the tree (assuming that nodes are numbered from 0 to $$n-1 $); Next, the $$n $$line, the $$I $$line corresponding to the number of the $$I $$node, gives the number of one English capital letter stored in the node, the number of the left child node, and the number of the right child node. If the child node is empty, the corresponding position is given with "'". The given data is separated by a space. Note: the title ensures that the letters stored in each node are different.
###Output format:
If two trees are isomorphic, output "yes", otherwise output "no".
###Enter sample 1 (corresponding to figure 1)
```in
eight
A 1 2
B 3 4
C 5 -
D - -
E 6 -
G 7 -
F - -
H - -
eight
G - 4
B 7 6
F - -
A 5 1
H - -
C 0 -
D - -
E 2 -
```
###Output sample 1:
```out
Yes
```
###Enter sample 2 (corresponding to figure 2)
```
eight
B 5 7
F - -
A 0 3
C 6 -
H - -
D - -
G 4 -
E 1 -
eight
D 6 -
B 5 -
E - -
H - -
C 0 2
G - 3
F - -
A 1 4
```
###Output sample 2:
```
No
```
answer:If there is no answer, please comment