//AC
#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <queue>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <ctype.h>
typedef long long ll;
using namespace std;
int main(){
char a[10010];
char b[10010];
bool flag;
gets(a);
gets(b);
for (int i=0; i<strlen(a); i++) {
flag=true;
for (int j=0;j<strlen(b); j++) {
if(a[i]== b[j]){
flag=false;
break;
}
}
if(flag){
cout<<a[i];
}
}
printf("\n");
return 0;
}