while 1:r,s,t=raw_input().split();print s.join(t.rsplit(r,1))