#include<stdio.h>
#include<stdlib.h>
void del(int key);
void display();
typedef struct node{
    int data;
    struct node *next;
}Node;

Node *head=NULL;
Node *tail=NULL;
Node *newnode=NULL;

void create(int num){
    newnode=(Node*)malloc(sizeof(Node));
    head->data=num;
    newnode->next=NULL;
    if(head==NULL){
        head=newnode;
        tail=newnode;
    }
    tail->next=newnode;
    tail=newnode;
}
void del(int key){
    Node *first=head;
    Node *second=head->next;
    if(key==head->data){
        head=head->next;
    }
    else{
    while(second->next!=NULL){
        if(second->data==key){
            first->next=second->next;
            break;
        }
        first=first->next;
        second=second->next;
    }
}
}

int main(){
    int size;
    int ind;
    int num;
    int key;
    int second;
    scanf("%d",&size);
    if(size<0){
        printf("Invalid input");
        return 0;
    }
    for(ind=0;ind<0;ind++){
        scanf("%d",&num);
        create(num);
    }
    scanf("%d",&key);
    del(key);
    if(head==NULL){
        printf("List is empty");
        return 0;
    }
    if(second!=NULL){
        printf("Not Found");
        return 0;
    }
    display();
    return 0;
}
void display(){
    Node *ind;
    for(ind=head;ind!=NULL;ind=ind->next){
        printf("%d",ind->next);
    }
}