#include<stdio.h>
#include<stdlib.h>

typedef struct N{int x;struct N*n;}N;

int main(){
    int n,d,f=0; 
    scanf("%d",&n);
    N *h=0,*t=0,*p;
    while(n--){
        p=malloc(sizeof(N));
        scanf("%d",&p->x);
        p->n=0;
        if(!h)h=t=p; else t=t->n=p;
    }
    scanf("%d",&d);
    if(h&&h->x==d){h=h->n;f=1;}
    else for(p=h;p&&p->n;p=p->n)
         if(p->n->x==d)
{p->n=p->n;f=1;break;}

    if(!f) puts("Not Found");
    else if(!h) puts("List is empty");
    else for(p=h)
}