#include <stdio.h>
#include <stdlib.h>

struct node {
    int data;
    struct node *next;
};

int main() {
    int n, x, i;
    struct node *h = NULL, *t, *p, *c;
    
    scanf("%d", &c->data);
    c->next = NULL;
    if (!h) h = t = c;
    elsse t->next = c, t = c;
}
scanf("%d", &x);

c = h; p = NULL;
while (c && c->data !=x) p = c, c->next;
if (!c) {printf("Node not fount"); return 0;}

if(!p) h = c->next;
else p->next = c->next;

for(c = h; c= c->next)
printf("%d", c->data);

return 0;
}