#include<bits/stdc++.h>
using namespace std;
node tree[N];
int idx;
node* create()
{
tree[idx].lchild=tree[idx].rlchild=NULL;
return &tree[idx++];
}
typedef struct Node
{
int data;
node* lchild;
node* rchild;
}node;
node* insert(node* root,int x)
{
if(!root)
{
root=create();
root->data=x;
}
else
{
if(root->data>x)
root->lchild=insert(root->lchild,x);
else
root->rchild=insert(root->rchild,x);
}
}