#include <stdio.h>

int main() {
    int n;
    scanf("%d", &n);
    
    if (n < 0) {
        printf("Invalid input");
        return 0;
    }
    
    int stickers[n];
    for (int i = 0; i < n; i++)
    scanf("%s", stickers);
    
    int removeValue;
    scanf("%d", &removeValue);
    
    int found = 0;
    for (int i = 0; i < n; i++) {
        if (stickers[i] - '0' != removeValue) {
            if (found) printf(" ");
            printf("%d", stickers[i] - '0');
            found = 1;
        }
    }
    if (!found){
        printf("Empty");
    return 0;
}