#include<stdio.h>
#include<stdlib.h>
struct TreeNode {
    int val;
    struct TreeNode*left;
    struct TreeNode*right;
};
struct TreeNode*createNode(int value){
struct TreeNode*newNode=(struct TreeNode*)malloc(sizeof(struct TreeNode));
newNode->val=value;
newNode->left=NULL;
newNode->right=NULL;
return newNode;
}
struct TreeNode*insert(struct TreeNode*root,int value){
    if(root==NULL){
        return createNode(value);
    }
    if (value<root->val){
        root->left=insert(root->left,value);
    }else if (value>root->val){
        root->right=insert(root->right,value);
    }
    return root;
}
int search(struct TreeNode*root,int target){
    if(root==NULL){
        return 0;
    }
    int search(struct TreeNode*root,int target){
        if(root==NULL){
            return 0;
        }
        if(target==root->val){
            return 1;
        }else if(target<root->val){
            return search(root->left,target);
        }else{
            return search(root->right,target);
        }
    }
void freeTree(struct TreeNode*root){
    if(root==NULL)return;
    freeTree(root->left);
    freeTree(root->right);
    free(root);
}
int main(){
    int n,target;
    if (scanf("%d",&n)!=1){
        printf("Invalid Input\n");
        return 0;
    }
    if (n<=0){
        printf("Invalid Input\n");
        return 0;
    }
    if (n<=0){
        printf("Invalid Input\n");
        return 0;
    }
    struct TreeNode*root=NULL;
    for(int i=0;i<n;i++){
        int num;
        if (scanf("%d",&num)!=1{
            printf("Invalid Input\n");
            freeTree(root);
            return 0;
        }
        root=insert(root,num);
    }
    if scanf("%d",&target)!=1){
        printf("Invalid Input\n");
        freeTree(root);
        return 0;
    }
    if(search(root,target)){
        printf("Found\n");
    }else{
        printf("Not found\n");
    }
    freeTree(root);
    return 0;
}