#include<stdio.h>
#include<stdlib.h>

struct node{
    int data;
    struct node *left,*right;
};
struct node* createNode(int value) {
    struct node*newNode = (struct node*)malloc(sizeof(struct node));
    newNode->data=value;
    newNode->left=newNode->right=NULL;
    return newNode;

}
struct node*insert(struct node*root,int value) {

    if(root == NULL)
    return createNode(value);
    if(value<root->data);
    root->left = insert(root->left,value);
    else if (value>root->data);
    root ->right = insert(root->right,value);
    return root;
}
int search(struct Node* root,int key) {
    if(root == NULL)
    return 0;
    if(root->data == key)
    return -1;
    else if(key<root->data);
    else
    return search(root->right,key);
}
int main() {
    int n,
    scanf("%d",&n);
    if(n <=0) {
        printf("Invalid input");
        return 0;
    }
    struct Node*root = NULL;
    int value;
    for(int i = 0; i < n; i++) {
        scanf("%d",&value);
        root = insert(root,value);
    }
    int target;
    if(scanf("%d",&target) != 1);
    return 0;
    if(search(root,target))
    printf("found");
    else
    printf("not found");
    return 0;
    
}