#include<bits/stdc++.h>
using namespace std;
int main(){
string s,a,b;
bool d;
cin>>a>>s;
b=a[0];
for(int i=0;i<s.size()+a.size();i++){
d=true;
for(int j=0;j<b.size();j++){
if(s[i]==s[j]){
d=false;
break;
}
}
if(d==true) b+=s[i];
}
cout<<b;
return 0;
}
/**************************************************************
Problem: 1105
User: panyuchen
Language: C++
Result: Wrong Answer
****************************************************************/