s_ = list(str(eval(input())))

t = list(str(eval(input())))



n = len(s_)

m = len(t)



if m > n:

    print('UNRESTORABLE')

    exit()



import copy

ans = []

for i in range(n-m+1):

    if s_[i] == t[0] or s_[i] == '?':

        temp = copy.copy(s_)

        for j in range(i, i+m):

            #print(i, temp)

            if s_[j] == '?':

                temp[j] = t[j-i]

            elif s_[j] == t[j-i]:

                continue

            else:

                break

        else:

            for k in range(n):

                if temp[k] == '?':

                    temp[k] = 'a'

            ans.append(''.join(temp))

if ans:

    ans.sort()

    print((ans[0]))

else:

    print('UNRESTORABLE')

s = str(eval(input()))

t = str(eval(input()))



n = len(s)

m = len(t)

if m > n:

    print('UNRESTORABLE')

    exit()



ans = []

for i in range(n-m+1):

    flag = True

    for j in range(m):

        if s[i+j] != t[j]:

            if s[i+j] != '?':

                flag = False

    if flag:

        p = s[:i]

        q = s[i+m:]

        temp = p.replace('?', 'a')+t+q.replace('?', 'a')

        ans.append(temp)



ans.sort()

if ans:

    print((ans[0]))

else:

    print('UNRESTORABLE')

s_ = list(str(eval(input())))
t = list(str(eval(input())))
n = len(s_)
m = len(t)
if m > n:
    print("UNRESTORABLE")
    exit()
import copy

ans = []
for i in range(n - m + 1):
    if s_[i] == t[0] or s_[i] == "?":
        temp = copy.copy(s_)
        for j in range(i, i + m):
            # print(i, temp)
            if s_[j] == "?":
                temp[j] = t[j - i]
            elif s_[j] == t[j - i]:
                continue
            else:
                break
        else:
            for k in range(n):
                if temp[k] == "?":
                    temp[k] = "a"
            ans.append("".join(temp))
if ans:
    ans.sort()
    print((ans[0]))
else:
    print("UNRESTORABLE")

s = str(eval(input()))
t = str(eval(input()))
n = len(s)
m = len(t)
if m > n:
    print("UNRESTORABLE")
    exit()
ans = []
for i in range(n - m + 1):
    flag = True
    for j in range(m):
        if s[i + j] != t[j]:
            if s[i + j] != "?":
                flag = False
    if flag:
        p = s[:i]
        q = s[i + m :]
        temp = p.replace("?", "a") + t + q.replace("?", "a")
        ans.append(temp)
ans.sort()
if ans:
    print((ans[0]))
else:
    print("UNRESTORABLE")

-s_ = list(str(eval(input()))) -t = list(str(eval(input()))) -n = len(s_) +s = str(eval(input())) +t = str(eval(input())) +n = len(s) -import copy - -    if s_[i] == t[0] or s_[i] == "?": -        temp = copy.copy(s_) -        for j in range(i, i + m): -            # print(i, temp) -            if s_[j] == "?": -                temp[j] = t[j - i] -            elif s_[j] == t[j - i]: -                continue -            else: -                break -        else: -            for k in range(n): -                if temp[k] == "?": -                    temp[k] = "a" -            ans.append("".join(temp)) +    flag = True +    for j in range(m): +        if s[i + j] != t[j]: +            if s[i + j] != "?": +                flag = False +    if flag: +        p = s[:i] +        q = s[i + m :] +        temp = p.replace("?", "a") + t + q.replace("?", "a") +        ans.append(temp) +ans.sort() -    ans.sort()