import re

S_ = eval(input())

T = eval(input())



Srev = "".join(reversed(S_))

Trev = "".join(reversed(T))



pattern = "".join(["[{}?]".format(t) for t in Trev])

ans = re.sub(pattern, Trev, Srev, count=1)

ans = "".join(reversed(ans.replace("?", "a")))

if ans.count(T):

    print(ans)

else:

    print("UNRESTORABLE")
import re

S_ = eval(input())

T = eval(input())

Tr = T[::-1]

Sr = S_[::-1]

reg = "".join(["[{}?]".format(x) for x in Tr])

ans = re.sub(reg, Tr, Sr, count=1)

if ans.count(Tr)==1:

    print((ans.replace("?", "a")[::-1]))

else:

    print("UNRESTORABLE")
import re

S_ = eval(input())
T = eval(input())
Srev = "".join(reversed(S_))
Trev = "".join(reversed(T))
pattern = "".join(["[{}?]".format(t) for t in Trev])
ans = re.sub(pattern, Trev, Srev, count=1)
ans = "".join(reversed(ans.replace("?", "a")))
if ans.count(T):
    print(ans)
else:
    print("UNRESTORABLE")

import re

S_ = eval(input())
T = eval(input())
Tr = T[::-1]
Sr = S_[::-1]
reg = "".join(["[{}?]".format(x) for x in Tr])
ans = re.sub(reg, Tr, Sr, count=1)
if ans.count(Tr) == 1:
    print((ans.replace("?", "a")[::-1]))
else:
    print("UNRESTORABLE")

-Srev = "".join(reversed(S_)) -Trev = "".join(reversed(T)) -pattern = "".join(["[{}?]".format(t) for t in Trev]) -ans = re.sub(pattern, Trev, Srev, count=1) -ans = "".join(reversed(ans.replace("?", "a"))) -if ans.count(T): -    print(ans) +Tr = T[::-1] +Sr = S_[::-1] +reg = "".join(["[{}?]".format(x) for x in Tr]) +ans = re.sub(reg, Tr, Sr, count=1) +if ans.count(Tr) == 1: +    print((ans.replace("?", "a")[::-1]))