#include<stdio.h>
#include<stdlib.h>
struct TreeNode{
    int data;
    struct TreeNode *left;
    struct TreeNode *right;
};
struct TreeNode* insert(struct TreeNode*root,int val){
    if(root==NULL){
    struct TreeNode* NewNode=(struct TreeNode*)malloc(sizeof(struct TreeNode));
        NewNode->data=val;
        NewNode->left=NewNode->right=NULL;
        return NewNode;
        printf("%d",NewNode->data);
    }
if(val<root->data)
{
    root->left=insert(root->left,val);
}
    else if(val >root->data)
    {
    root->right=insert(root->right,val);
    }    
    return root;
} 
int search(struct TreeNode*root,int target)
{
    while(root)
    {
        
        if(root->data==target)
        {
            return 1;
        }
        if(target<root->data)
        {
            root=root->left;
        }
        else{
            root=root->right;
        }
    }
return 0;
}
int main()
{
    int n;
    scanf("%d",&n); 
    if(n <=0)
    {
        printf("Invalid input");
        return 0;
    }
    struct TreeNode *root =NULL;
    int val;
    int i;
    for(i=0;i<n;i++)
    scanf("%d",&val);
    root=insert(root,val);
    int target;
scanf("%d",&target);
if(target==0)
{
    printf("Found");
    return;
}
else{
if(search(root, target))
{
printf("Found\n");
}
else
{
printf("Not found\n");
return 0;
}
}
}