
#include <bits/stdc++.h>
using namespace std;
typedef long int ll;
const int N = 1e5 + 10;
void solve()
{
string s;
getline(cin, s);
string ab;
getline(cin,ab);
bool st[s.length() + 1];
memset(st, false, sizeof(st));
for (int i = 0; ab[i]; i++)
{
for (int j = 0; j <= s.length(); j++)
{
if (ab[i] == s[j])
st[j] = true;
}
}
for (int i = 0; i <= s.length(); i++)
if (st[i] == false)
cout << s[i];
}
signed main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t = 1;
while (t--)
{
solve();
}
return 0;
}