#include <stdio.h>
#include <stdlib.h>
struct Node{
char data;
struct Node * left;
struct Node * right;
};
void Create(Node ** root){
char ch;
scanf("%c", &ch);
if(ch == '#') return;
*root = (Node *)malloc(sizeof(struct Node));
(*root) -> data = ch;
(*root) -> left = NULL;
(*root) -> right = NULL;
Create( &( (*root) ->left ) );
Create( &( (*root) ->right) );
}
void Pre(Node * root){
if(root == NULL) return;
printf("%c ", root -> data);
Pre(root -> left);
Pre(root -> right);
}
int main(){
Node * head;
Create(&head);
printf("input oVer\nPre order: ");
Pre(head);
printf("\n");
}