#include<stdio.h>
#include<stdlib.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;
 
  }
  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(scanf("%s",targetstr)!=1) {
      printf("Invalid input\n");
      return 0;
  }
  for (int k=0;k<strlen(target);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;
  }