char r[999],g[999],d[999],z[999];main(){
	int c,i,j,k,l;
	for(;scanf("%s%s%s",r,g,d)>2;z[l]=0,printf("%s\n",z)){
		for(i=j=k=l=0,c=g[j++];k+l<strlen(r)+strlen(g);){
		//if(c==r[i]){
			if(c==d[k]){//push_down
				k++;
				c=r[i++];
			}else{ //push_right
				z[l++]=c;
				c=g[j++];
			}
		}
	}
exit(0);}