#include <stdio.h>


int Check(char a , char* p)
{
    int i = 0;
    while(*(p + i))
    {
        if(a == *(p + i))
        return 1;
        i++;
    }
    return 0;
}
int main() {
    char arr1[110] = { 0 };
    char arr2[110] = { 0 };
    gets(arr1);
    gets(arr2);

    int i = 0 ;
    while(arr1[i])
    {
        if(Check(arr1[i] , arr2) == 0)
        printf("%c",arr1[i]);
        i++;
    }
  //thanks to bite Mr.peng
    return 0;
}