#include<stdio.h>
#include<stdlib.h>
#include<ctype.h>
#include<string.h>
struct Node{
    int data;
    struct Node*prev;
    struct Node*next;
};
struct Node*createNode(int data){
    struct Node* newNode=(struct Node*)malloc(sizeof(struct Node));
    newNode->data=data;
    newNode->prev=NULL;
    newNode->next=NULL;
    return newNode;
}
void append(struct Node**head,int data){
    struct Node*newNode=createNode(data);
    if(*head==NULL){
        *head=newNode;
        return;
    }
    struct Node*temp=*head;
    while(temp->next !=NULL){
        temp=temp->next;
    }
    temp->next=newNode;
    newNode->prev=temp;
}
int searchTarget(struct Node*head,int target){
    struct Node*temp=head;
    while(temp !=NULL){
        if(temp->data==target){
        return 1;
        }
       temp=temp->next; 
    }
    return 0;
}
int isValidInteger(char*str){
    if(str==NULL||strlen(str)==0){
        return 0;
    }
    int i=0;
    if(str[0]=='-'){
        if(strlen(str)==1){
            return 0;
        }
    for(int i=1;i<strlen(str);i++){
        if(!isdigit(str[i])){
            return 0;
        }
    }
    return 1;
}
void freeList(struct Node*head){
    struct Node*temp;
    while(head!=NULL){
        temp=head;
        head=head->next;
        free(temp);
    }
}
int main(){
    int n;
    if(scanf("%d",&n)!=1||n<1||n>1000){
        printf("Invalid input");
        return 0;
    }
    struct Node*head=NULL;
    for(int i=0;i<n;i++){
        char buffer[50];
        if(scanf("%s",buffer)!=1){
            printf("Invalid input");
            freeList(head);
            return 0;
        }
        if(!isValidInteger(buffer)){
            printf("Invalid input");
            freeList(head);
            return 0;
        }
        int sensorId=atoi(buffer);
        append(&head,sensorId);
    }
    char targetBuffer[50];
    if(scanf("%s",targetBuffer)!=1){
        printf("Invalid input");
            freeList(head);
            return 0;
        }
        if(!isValidInteger(targetBuffer)){
            printf("Invalid input");
            freeList(head);
            return 0;
        }
        int target=atoi(targetBuffer);
        if(searchTarget(head,target)){
            printf("Found");
        }else{
            printf("Not found");
        
        freeList(head);
        return 0;
    }