from copy import deepcopy



S = eval(input())

T = eval(input())



answer = ''

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

    found = True

    if any([S[i+j] != '?' and S[i+j] != T[j] for j in range(len(T))]):

        continue

    tmp = deepcopy(S).replace('?', 'a')

    tmp = tmp[:i] + T + tmp[i+len(T):]

    if answer == '' or tmp < answer:

        answer = tmp



if answer == '':

    print('UNRESTORABLE')

else:

    print(answer)
S = eval(input())

T = eval(input())



answer = ''

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

    if any([S[i+j] != '?' and S[i+j] != T[j] for j in range(len(T))]):

        continue

    tmp = (S[:i] + T + S[i+len(T):]).replace('?', 'a')

    if answer == '' or tmp < answer:

        answer = tmp 



if answer == '':

    print('UNRESTORABLE')

else:

    print(answer)
from copy import deepcopy

S = eval(input())
T = eval(input())
answer = ""
for i in range(len(S) - len(T) + 1):
    found = True
    if any([S[i + j] != "?" and S[i + j] != T[j] for j in range(len(T))]):
        continue
    tmp = deepcopy(S).replace("?", "a")
    tmp = tmp[:i] + T + tmp[i + len(T) :]
    if answer == "" or tmp < answer:
        answer = tmp
if answer == "":
    print("UNRESTORABLE")
else:
    print(answer)

S = eval(input())
T = eval(input())
answer = ""
for i in range(len(S) - len(T) + 1):
    if any([S[i + j] != "?" and S[i + j] != T[j] for j in range(len(T))]):
        continue
    tmp = (S[:i] + T + S[i + len(T) :]).replace("?", "a")
    if answer == "" or tmp < answer:
        answer = tmp
if answer == "":
    print("UNRESTORABLE")
else:
    print(answer)

-from copy import deepcopy - -    found = True -    tmp = deepcopy(S).replace("?", "a") -    tmp = tmp[:i] + T + tmp[i + len(T) :] +    tmp = (S[:i] + T + S[i + len(T) :]).replace("?", "a")