#include<stdio.h>
#include<stdlib.h>
struct Node{
    int data;
    struct Node* left;
    struct Node* right;
};

struct Node* createNode(int data){
    struct Node*newNode=(struct Node*)malloc(sizeof(struct Node));
    if(!newNode){
        printf("Memory allocation failed\n");
        exit(1);
    }
    newNode->data=data;
    newNode->left=newNode->righth=NULL;
    return newNode;
}

struct Node* insert(struct Node* root,int data){
    if(root==NULL){
        return createNode(data);
    }
    if(data<root->data)
        root->left=insert(root->left,data);
    else if(data>root->data)
        root->right=insert(root->right,data);
    return root;
}
int main(){
    int n,value,target;
    scanf("%d",&n);
    if(n<0){
        printf("Invalid input\n");
        return 0;
}