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