#include <stdio.h>
#include <stdlib.h>
#include<string.h>
#include<ctype.h>
struct Node {
    int data;
    struct Node* next;
};

struct Node* createNode(int data) {
    struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));
    newNode->data = data;
    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 search(struct Node*head,int target){
    struct Node*current=head;
    while(current!=NULL){
        if(current->data==target)
        return 1;
        current=current->next;
    }
    return 0;
}
int main(){
    int n;
    if(scanf("%d",&n)!=1||n<1||n>1000){
        printf("Invalid input\n");
        return 0;
    }
    struct Node*head=NULL;
    for(int i=0;i<n;i++){
        char buffer[50];
        if (scanf("%s",buffer)!=1){
            printf("Invalid input\n");
            return 0;
        }
        for (int k=0;k<strlen(buffer);k++){
            if(!isdigit(buffer[k])&&!(k==0 && buffer[k]=='-')){
                printf("Invalid input\n");
                return 0;
            }
        }
        int value=atoi(buffer);
        append(&head,value);
        }
        char targetStr[50];
        if(scan("%s",targetStr)!=1){
            printf("Invalid input\n");
            return 0;
        }
        for(int k=0;k<strlen(targetStr);k++){
            if(!isdigit(targetStr[k]&&!(k==0&&targetStr[k]=='-')){
                printf("Invalid input\n");
                return 0;
            }
        }
        int target=atoi(targetStr);
        if(search(head,target))
        printf("Found\n");
        else
        printf("Not found\n");
        return 0;
        }