s = eval(input())

t = eval(input())

ans = "UNRESTORABLE"

for begin in range(len(s)):#塗り替えるとこの始点

    if begin+len(t) > len(s):

        break

    tmp = list(s)

    ti = 0

    for i in range(begin,begin+len(t)):

        tmp[i] = t[ti]

        ti += 1

    for i in range(len(s)):

        if s[i] != '?':

            if s[i] != tmp[i]:

                break

    else:

        for i in range(len(s)):

            if tmp[i] == "?":

                tmp[i] = 'a'

        ans = "".join(tmp)

print(ans)
S = eval(input())

T = eval(input())



if len(S) < len(T):

    print('UNRESTORABLE')

    exit()

    



ind = None

for i in range(len(S)-len(T)+1):

    for j in range(len(T)):

        if S[i+j] == "?":

            continue

        elif S[i+j] == T[j]:

            continue

        else:

            break

    else:

        ind = i



if ind == None:

    print('UNRESTORABLE')

else:

    ans = list(S)

    for i in range(ind,ind+len(T)):

        ans[i] = T[i-ind]

    for i in range(len(ans)):

        if ans[i] == "?":

            ans[i] = "a"

    print(("".join(ans)))
s = eval(input())
t = eval(input())
ans = "UNRESTORABLE"
for begin in range(len(s)):  # 塗り替えるとこの始点
    if begin + len(t) > len(s):
        break
    tmp = list(s)
    ti = 0
    for i in range(begin, begin + len(t)):
        tmp[i] = t[ti]
        ti += 1
    for i in range(len(s)):
        if s[i] != "?":
            if s[i] != tmp[i]:
                break
    else:
        for i in range(len(s)):
            if tmp[i] == "?":
                tmp[i] = "a"
        ans = "".join(tmp)
print(ans)

S = eval(input())
T = eval(input())
if len(S) < len(T):
    print("UNRESTORABLE")
    exit()
ind = None
for i in range(len(S) - len(T) + 1):
    for j in range(len(T)):
        if S[i + j] == "?":
            continue
        elif S[i + j] == T[j]:
            continue
        else:
            break
    else:
        ind = i
if ind == None:
    print("UNRESTORABLE")
else:
    ans = list(S)
    for i in range(ind, ind + len(T)):
        ans[i] = T[i - ind]
    for i in range(len(ans)):
        if ans[i] == "?":
            ans[i] = "a"
    print(("".join(ans)))

-s = eval(input()) -t = eval(input()) -ans = "UNRESTORABLE" -for begin in range(len(s)):  # 塗り替えるとこの始点 -    if begin + len(t) > len(s): -        break -    tmp = list(s) -    ti = 0 -    for i in range(begin, begin + len(t)): -        tmp[i] = t[ti] -        ti += 1 -    for i in range(len(s)): -        if s[i] != "?": -            if s[i] != tmp[i]: -                break +S = eval(input()) +T = eval(input()) +if len(S) < len(T): +    print("UNRESTORABLE") +    exit() +ind = None +for i in range(len(S) - len(T) + 1): +    for j in range(len(T)): +        if S[i + j] == "?": +            continue +        elif S[i + j] == T[j]: +            continue +        else: +            break -        for i in range(len(s)): -            if tmp[i] == "?": -                tmp[i] = "a" -        ans = "".join(tmp) -print(ans) +        ind = i +if ind == None: +    print("UNRESTORABLE") +else: +    ans = list(S) +    for i in range(ind, ind + len(T)): +        ans[i] = T[i - ind] +    for i in range(len(ans)): +        if ans[i] == "?": +            ans[i] = "a" +    print(("".join(ans)))