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