#include<stdio.h>
#include<stdlib.h>
struct node{
    int data;
    struct node *left, *right;
};
struct node* newnode(int  val){
    struct node * node = (struct node*)malloc(sizeof(struct node));
    node->data = val;
    node->left = node->right = NULL;
    return node;
}
struct node* insert(struct node* root,int val){
if (root == NULL) return newnode(val);
if (val < root->data)
root->left = insert(root->left,val);
else if (val >root->data)
root->right = insert(root->right,val);
return root;
}