#include <functional>
#include <iostream>
using namespace std;

int main() {
    string first_str;
    string second_str;
    string deleted_str;

    getline(cin, first_str);
    // cout << first_str<<endl;

    getline(cin,second_str);
    // cout << second_str;
    
    long long size_first = 0;
    long long size_second = 0;
    int in_flag = 0;

    size_first = first_str.size();
    size_second=second_str.size();
    for (long long i=0; i<size_first; i++) {
        char first_ch = first_str[i];
        in_flag = 0;
        for (long long j=0; j<size_second; j++) {
            if(first_ch == second_str[j]) {
                in_flag = 1;
                break;
            }
        }

        if(in_flag == 0) {
            deleted_str.append(1, first_ch);
        }
    }

    cout << deleted_str;
    
}
// 64 位输出请用 printf("%lld")