import os, sys class FastIO: def __init__(self): self.flush = False return @staticmethod def read_str(): return sys.stdin.readline().rstrip() def st(self, x): return print(x, flush=self.flush) def lst(self, x): return print(*x, flush=self.flush) class Solution: def __init__(self): return @staticmethod def main(ac=FastIO()): t = 1 for _ in range(t): X=ac.read_str() Y=ac.read_str() xlen,ylen=len(X),len(Y) if xlen==ylen or xlen==ylen+1: ans=['$']*(xlen<<1) if xlen==ylen else ['$']*(xlen+ylen) ans[::2]=X ans[1::2]=Y ac.st(''.join(ans)) else: ac.st('?') Solution().main()