#include <stdio.h>
int Is_exist(char* arr, char ch) {
    while (*arr) {
        if (*arr == ch) {
            return 1;
        }
        arr++;
    }
    return 0;
}

int main() {
    char arr1[100] = { 0 };
    char arr2[100] = { 0 };
    gets(arr1);
    gets(arr2);
    int i = 0;
    while (arr1[i]) {
        if (Is_exist(arr2, arr1[i]) == 0) {
            printf("%c", arr1[i]);
        }
        i++;
    }

    return 0;
}