#include<stdio.h>
#include<stdlib.h>
struct node{
    int data;
    struct node *left,right;
};

struct node *create(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 create(value);
    if(value<root->val) root->left=insert(root->left,value);
    else root->right=insert(root->right,value);
    return root;
}
int search(struct node*root,int value){
    if(root=NULL) return 0;
    if(root->data==value) return 1;
    if(value<root->data) return search(root->left,value);
    else return search(root->right,value);
}
int main(){
    int n;
    scanf("%d",&n);
    if(n<=0){
        printf("Invalid input\n");
        return 0;
    }
    struct node*root=NULL;
    for(int i=0;i<n;i++){
        int value;
        scanf("%d",&value);
        root=insert(root,value);
        
    }
    int target;
    scanf("%d",&target);
    if(search(root,target))
    printf("\n Found");
    else
    printf("\nNOT Found");
    return 0;
}