brtakoktrosttttttttttosafasfkalsfkodfdasiofhadfhasdsajfdsafoasodsafahaihfdisoadspapsapiosapdsajdipsahdhasuirhaeuifhhfkjgosooooooooodafdfioottttafdsafaddfuiasdjfjasdo
okat
tako
 aleksandrehteosidatedodam
evo
si
 goodbyeihopecontestisntsohar
oh
god
 duxidimkeetoivas
dd
odi
 hellodeninobrdo
od
hel
 ikbalturkeybelieveinyou
bal
kan
 zdule
didins
meinkraft
 cumurcumur
um
cur
 ikatanictisinajboljiuhrvatskojakoprictasovojaviseakotijedosadno
javise
sine
 zlobobermyfriendandthanksforhelp
de
for
 navijamzaradnickiastabidrugo
druzina
djavola
 saljivdzijasamjaneki
neki
ja
 bumbumdzejsikerol
bumbum
bum
 svetislavgajicpoznatijikaosvetaxxx
slavi
slavu
 princeofpersiayouhavegreatcontestbutinwrongtime
op
pera
 pozdravizamarkamatovicaaleksandracveticainenadaslagalicustanisica
vas
rad
 dreamoonhasonedream
no
no
 jankosustersicneceovoraditi
cosovic
oce
 milenicnikolaitisideotakmicenja
elem
nik
 touristyouaregreatguy
tourist
guy
 lukavpastaakojelukav
a
u
 xxxbbbcccoca
ca
cb
 aaaaaabababaaa
aa
a
 petryouaregoodandyouhavegoodblogs
blog
rega
 lebronnojameslebronprogrammers
je
bro
 mztskopjetisisampiosrcenaterenostaviajdezanaspobedi
mzt
optee
 gukimikazedauradimseminarskidodatnohumorhumor
dp
mrzime
 razredninjegosgrebovicdobarcoveklosbasketas
ne
go
 pozdravzamojeodeljenjeiprofesoreocudabudempetnula
bojan
cao
 damandicnenapravicheckerzeznulibise
man
ker
 pozdravizazenskudecunecuvasodvajatidaseneprotumacipogresno
cao
deco
 egoryouaregoodbutcantsolveeverythinginonehour
eat
your
 lemigazalemiolemilicomzalemljenje
lemi
zlo
 randomusername
umno
umno
 thisiscornercase
youhavetwolongerstrings
ibelivethatyoudontmissit
 oduleodule
xgrizx
ivanstosicprvi
 molimprofesorkuengleskogdamidapetjasamdobarcovekitrudimseiztogaiakosamoperisan
hvala
unapred
 djeneralmilomirstefanovic
radi
nesto
 balsabratepozdravimajudevojku
oj
zdrav
 iwanttothanktomygrandmaheisveryimportantpersoninmylife
thanks
stanka

takotakotakotakotakoaaaaaaaaaaaaaaaaaaaaaabddddddddddddddddddeffffffffffffffffffghhhhhhhhhiiiiiiiiijjjjjloooooooooooooooooppppprrrssssssssssssssssssssstttttttttttuuu
 siaaaaddddeeeehklmnoorstt
 ohohgodabceeeiinnooprsssttty
 odiadeeiikmstuvx
 ododhelbeilnnor
 kanbbeeeeiiikllortuuvyy
 deluz
 umumcurcur
 sinesineaaaaaaaaabccddhiiiiiijjjjjkkkklnooooooooprrssstttttuvvv
 dedeforforaabbehhikllmnnnoprstyz
 druzinaaaaaabcdgiiijkmnorstv
 nekijajajaadiilmssvz
 bumbumdeeijklorsz
 slaviaaaaceegiiijjknoopsstttvvxxxz
 peraperaabcceeeefgghiiiimnnnnoooorrsstttttuuvwy
 vasvasvasradradradaaaaaaaaaaccccceeegiiiiiiikklllmmnnnnoopstttuzz
 nonoaaaddeeehmmorrs
 oceoceaadeiiijknnorrsssttuv
 elemniknikaaaccdeiiiiijlmnoostt
 touristguyguyaaeeorrt
 aaaaauuejkkkllopstvv
 cacbcbcboxxx
 aaaaaaaaaaabbb
 blogregaregaadddehnoooooopstuuvyy
 jebrobroaaeeegllmmmnnnooprrrss
 mztopteeopteeopteeaaaaaabcddiiiiijjkmnnnorrssssssvz
 mrzimeaaaaaddddeghhiiiikkkmmmnnoooorrrsstuuuu
 nenegogoaaaabbbccddeeeiijkklooorrrrsssstvvz
 bojancaoaaddddeeeeeeeefijjllmmnooooppprrrstuuuvzz
 mankeraaabcccddeeeehiiiilnnnprsuvzz
 decodecodecoaaaaaaadeeegiiijkmnnnnooppprrrssssttuuuuvvvzzz
 eateatyouryourbcdeeeeggghhiilnnnnooooorrstuvv
 lemilemilemilemizlozloaaaceegjjmn
 umnoaadeemnrrs
 acceehiinorrssst
 ddeelloouu
 unapredunapredaaaaaaabcddeeeeefgggiiiiiiijkkkkllmmmmmmoooooooooprrrsssssstttvz
 radinestoaceefiijllmmnorv
 ojojzdravaaaabbdeeiklmprstuuv
 stankaaaadeeeefghhiiiiilmmmmnnnnnoooopprrrrstttttvwyyy

import java.util.Scanner;
import java.util.ArrayList;
import java.lang.String;

public class ZgukistringZ
{
	public static void main(  String args [] )
	{
		String a, b, c ;
		ArrayList<Character> sa = new ArrayList<>();
		ArrayList<Character> sc = new ArrayList<>();
		ArrayList<String> k = new ArrayList<>();
		boolean BenA = true;
		boolean CenA = true;
		Scanner entrada = new Scanner( System.in );
		a = entrada.next();
		b = entrada.next();
		c = entrada.next();
		
		if( a.length() >= b.length() )
			for( int i = 0; i < b.length(); i++ )
			{
				if( !BenA )
					break;
				for( int j = 0; j < a.length(); j++)
					if( b.charAt( i ) == a.charAt( j ) )
					{
						BenA = true;
						break;
					}
					else
						BenA = false;
			}
			
		if( a.length() >= c.length() )
			for( int i = 0; i < c.length(); i++ )
			{
				if( !CenA )
					break;
				for( int j = 0; j < a.length(); j++)
					if( c.charAt( i ) == a.charAt( j ) )
					{
						CenA = true;
						break;
					}
					else
						CenA = false;
			}
			
		if ( BenA && !CenA)
		{
			for( int i = 0; i < a.length(); i ++)
				sa.add( a.charAt(i) );
			
			for( int i = 0; i < b.length(); i++ )
				sa.remove( (Character)b.charAt(i) );
			k.add( b );
			for( int i = 0; i < k.size(); i++)
				System.out.print( k.get(i) );
			for( int i = 0; i <sa.size(); i++)
				System.out.print( sa.get(i) );
			
		}
		else if( CenA && !BenA )
		{
			for( int i = 0; i < a.length(); i ++)
				sc.add( a.charAt(i) );
			for( int i = 0; i < c.length(); i++ )
				sa.remove( (Character )c.charAt(i) );
			k.add( c );
			for( int i = 0; i < k.size(); i++)
				System.out.print( k.get(i) );
			for( int i = 0; i <sc.size(); i++)
				System.out.print( sc.get(i) );
		}
		else if( CenA && BenA )
		{
			for( int i = 0; i < a.length(); i ++)
				sa.add( a.charAt(i) );
			for( int i = 0; i < b.length(); i++ )
				sa.remove( (Character)b.charAt(i) );
			for( int i = 0; i < c.length(); i++ )
				sa.remove( (Character )c.charAt(i) );
			k.add( b );
			k.add( c );
			for( int i = 0; i < k.size(); i++)
				System.out.print( k.get(i) );
			for( int i = 0; i <sa.size(); i++)
				System.out.print( sa.get(i) );
		}
		else{
			System.out.print( a );
			
		}
	}
}
