#include<bits/stdc++.h>
using namespace std;
int main(){
	int i,j;
	string s,k,a;
	bool n=0;
	cin>>s>>k;
	  a=s+k;
	string h;
	for(i=0;i<a.size();i++){
		if(h.find(a[i])==-1) h+=a[i];
	}
	cout<<h;
	return 0;
}

/**************************************************************
	Problem: 1105
	User: houshanglin
	Language: C++
	Result: Accepted
	Time:14 ms
	Memory:2076 kb
****************************************************************/