#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 100005; int main(){ //bool hashTable[256] = {true}; memset(hashTable,true,sizeof(hashTable)); char fir[MAX_LEN]; char sec[MAX_LEN]; scanf("%s",&fir); for(int i = 0;i<strlen(fir);++i){ if(fir[i] >= 'A' && fir[i] <= 'Z'){ fir[i] = fir[i] - 'A' + 'a'; } hashTable[fir[i]] = false; } scanf("%s",&sec); //cout<<hashTable['t']; for(int i = 0;i<strlen(sec);++i){ if(sec[i]>='A' && sec[i] <= 'Z'){ int low = sec[i] -'A' + 'a'; if(hashTable[low] == true && hashTable['+'] == true){ cout<<sec[i]; } }else if(hashTable[sec[i]] == true){ cout<<sec[i]; } } system("pause"); return 0; }