import sys



s = eval(input())

t = eval(input())



for i in range(len(s)-len(t)+1):

  if i == 0:

    sub = s[-i-len(t):]

  else:

    sub = s[-i-len(t):-i]

  for j in range(len(t)):

    if sub[j]!=t[j] and sub[j]!="?":

      break

  else:

    if i == 0:

      s = s[:-i-len(t)]+t

    else:

      s = s[:-i-len(t)]+t+s[-i:]

    s = s.replace("?","a")

    print(s)

    sys.exit()

  continue

    

print("UNRESTORABLE")
import sys



s = eval(input())

t = eval(input())

lenS = len(s)

lenT = len(t)

for i in range(lenS-lenT,-1,-1):

  sub = s[i:i+lenT]

  for j in range(lenT):

    if sub[j]!="?" and sub[j]!=t[j]:

      break

  else:

    s=s.replace("?","a")

    print((s[:i]+t+s[i+lenT:]))

    sys.exit()

  continue

  

print('UNRESTORABLE')
import sys

s = eval(input())
t = eval(input())
for i in range(len(s) - len(t) + 1):
    if i == 0:
        sub = s[-i - len(t) :]
    else:
        sub = s[-i - len(t) : -i]
    for j in range(len(t)):
        if sub[j] != t[j] and sub[j] != "?":
            break
    else:
        if i == 0:
            s = s[: -i - len(t)] + t
        else:
            s = s[: -i - len(t)] + t + s[-i:]
        s = s.replace("?", "a")
        print(s)
        sys.exit()
    continue
print("UNRESTORABLE")

import sys

s = eval(input())
t = eval(input())
lenS = len(s)
lenT = len(t)
for i in range(lenS - lenT, -1, -1):
    sub = s[i : i + lenT]
    for j in range(lenT):
        if sub[j] != "?" and sub[j] != t[j]:
            break
    else:
        s = s.replace("?", "a")
        print((s[:i] + t + s[i + lenT :]))
        sys.exit()
    continue
print("UNRESTORABLE")

-for i in range(len(s) - len(t) + 1): -    if i == 0: -        sub = s[-i - len(t) :] -    else: -        sub = s[-i - len(t) : -i] -    for j in range(len(t)): -        if sub[j] != t[j] and sub[j] != "?": +lenS = len(s) +lenT = len(t) +for i in range(lenS - lenT, -1, -1): +    sub = s[i : i + lenT] +    for j in range(lenT): +        if sub[j] != "?" and sub[j] != t[j]: -        if i == 0: -            s = s[: -i - len(t)] + t -        else: -            s = s[: -i - len(t)] + t + s[-i:] -        print(s) +        print((s[:i] + t + s[i + lenT :]))