PROGRAMMING:Non recursive traversal of binary tree
This problem requires the use of stack to achieve non recursive traversal of binary tree, including three traversal methods: first order, middle order and second order.
###Input format:
The input sequence is input according to the pre order sequence, and the empty node is represented by @
###Output format:
The preorder, middle order and postorder traversal sequences are output by line respectively
###Input example:
```in
ABC@@D@@ E@FG@@@
```
###Output example:
```out
ABCDEFG
CBDAEGF
CDBGFEA
```
answer:If there is no answer, please comment
###Input format:
The input sequence is input according to the pre order sequence, and the empty node is represented by @
###Output format:
The preorder, middle order and postorder traversal sequences are output by line respectively
###Input example:
```in
ABC@@D@@ E@FG@@@
```
###Output example:
```out
ABCDEFG
CBDAEGF
CDBGFEA
```
answer:If there is no answer, please comment