// editor4
#include <stdio.h>
typedef struct node{
    int data;
    struct node *next;
}Node;
int main(){
    int n,i,key,found;
    if(n<0||!scanf("%d",&n)){
        printf("Invalid input");
        return 0;
    }
    int a[n];
    for(i=0;i<n;i++){
        if(a[i]<0||!scanf("%d",&a[i])){
            printf("Invalid input");
            return 0;            
        }
    }
    if(key<0||!scanf("%d",&key)){
        printf("Invalid input");
        return 0;
    }
    for(i=0;i<n;i++){
        if(a[i]!=key){
            printf("%d ",a[i]);
        }
        else{
            found=1
        }
    }
    if(found==1){
        
        printf("Marble not found");
    }
}