#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==NULL){
        printf("Memory allocation failed\n");
        exit(1);
    }
    newNode->data=data;
    newNode->left=NULL;
    newNode->right=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 search(struct Node* root,int target){
    if(root==NULL)
       return 0;
    if(root->data==target)
       return 1;
    else if(target<root->data)
       return search(root->left,target);
    else
       return search(root->right,target);
}
int main(){
    int n,value,target;
    struct Node* root=NULL;
    scanf("%d",&n);
    
    if(n<=0){
        printf("invalid input\n");
        return 0;
    }
    
    for(int i=0;i<n;i++){
        scanf("%d",&value);
        root=insert(root,value);
    }
    scanf("%d",&target);
}
    if (search(root,target))
       printf("found\n");
       else
       printf("not found");
       return 0;
}