#include<stdio.h>
#include<stdlib.h>
struct node{
    int data;
    struct node *left;
    struct node*right;
};
struct node*createNode(int value)
{
    struct node*newnode=(struct node*)malloc(sizeof(struct node));
    newnode->data=value;
    newnode->left=NULL;
    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);
    else if(value > root->data)
    root->right=insert(root->right, value);
    return root;
}
int search(struct node*root,int key){
    struct node* current = root;
    while(current != NULL){
    if(current->data == key)
    return 1;
    else if(key < current->data)
    return = current->left;
        else
        return = current->right;
    }
    return 0;
    }
int main()
{
    int n;
    if(scanf("%d",&n)!=1){
        printf("Invalid input");
        return 0;
    }
    if(n<=0){
        printf("Invalid input");
        return 0;
    }
    if(n>10){
        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;

}