PROGRAMMING:Restore binary tree
Given the middle order traversal sequence and pre / post order traversal sequence of a full binary tree. Try to restore the binary tree and give its hierarchical traversal sequence.
###Input format:
The input has only one set of samples.
The first line gives the height h of the full binary tree ($$3 / Leq H / Leq 20 $$) (the height of the tree with only the root node is 1).
In the next two lines, one line gives the sequence of middle order traversal, and the other line may give the sequence of preorder traversal or postorder traversal. Sequence elements are guaranteed to be in the range of integers and different from each other.
Note: for the two groups of input sequences, the middle order traversal sequence may be the first group or the second group.
###Output format:
Output the hierarchical traversal sequence of the full binary tree.
###Input sample 1:
```in
three
1 2 4 5 3 6 7
4 2 5 1 6 3 7
```
###Output sample 1:
```out
1 2 3 4 5 6 7
```
###Input sample 2:
```in
three
4 2 5 1 6 3 7
4 5 2 6 7 3 1
```
###Output sample 2:
```out
1 2 3 4 5 6 7
```
answer:If there is no answer, please comment
###Input format:
The input has only one set of samples.
The first line gives the height h of the full binary tree ($$3 / Leq H / Leq 20 $$) (the height of the tree with only the root node is 1).
In the next two lines, one line gives the sequence of middle order traversal, and the other line may give the sequence of preorder traversal or postorder traversal. Sequence elements are guaranteed to be in the range of integers and different from each other.
Note: for the two groups of input sequences, the middle order traversal sequence may be the first group or the second group.
###Output format:
Output the hierarchical traversal sequence of the full binary tree.
###Input sample 1:
```in
three
1 2 4 5 3 6 7
4 2 5 1 6 3 7
```
###Output sample 1:
```out
1 2 3 4 5 6 7
```
###Input sample 2:
```in
three
4 2 5 1 6 3 7
4 5 2 6 7 3 1
```
###Output sample 2:
```out
1 2 3 4 5 6 7
```
answer:If there is no answer, please comment