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