import qualified Data.ByteString.Char8  as C
import Data.List
main = C.interact $ sol . C.lines

sol [o,e] = fst . fst $ C.mapAccumL f (C.empty,e) o

f (acc,e) c = if C.null e 
  then ((C.snoc acc c,e), c)
  else ((C.snoc (C.snoc acc c) (C.head e),C.tail e), c)