S = eval(input())

T = eval(input())



len_S, len_T = len(S), len(T)







def judge(start):

    # print(S[start: start+len_T])

    for j in range(len_T):

        if S[start+j] == '?':

            continue



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

            continue



        else:

            return False



    return True





for i in range(len_S - len_T, -1, -1):

    if judge(i):

        S = S[:i] + T + S[i+len_T:]

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

        print(S)

        exit()



print('UNRESTORABLE')

# -*- coding: utf-8 -*-

S = eval(input())

T = eval(input())



candidates = []

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

    is_ok = True

    for j in range(len(T)):

        if S[i+j] == '?' or S[i+j] == T[j]:

            pass

        else:

            is_ok = False



    # print(is_ok)

    if is_ok:

        candidate = S[:i] + T + S[i+len(T):]

        candidate = candidate.replace('?', 'a')

        candidates.append(candidate)



if candidates:

    candidates.sort()

    print((candidates[0]))

else:

    print('UNRESTORABLE')
S = eval(input())
T = eval(input())
len_S, len_T = len(S), len(T)


def judge(start):
    # print(S[start: start+len_T])
    for j in range(len_T):
        if S[start + j] == "?":
            continue
        elif S[start + j] == T[j]:
            continue
        else:
            return False
    return True


for i in range(len_S - len_T, -1, -1):
    if judge(i):
        S = S[:i] + T + S[i + len_T :]
        S = S.replace("?", "a")
        print(S)
        exit()
print("UNRESTORABLE")

# -*- coding: utf-8 -*-
S = eval(input())
T = eval(input())
candidates = []
for i in range(len(S) - len(T) + 1):
    is_ok = True
    for j in range(len(T)):
        if S[i + j] == "?" or S[i + j] == T[j]:
            pass
        else:
            is_ok = False
    # print(is_ok)
    if is_ok:
        candidate = S[:i] + T + S[i + len(T) :]
        candidate = candidate.replace("?", "a")
        candidates.append(candidate)
if candidates:
    candidates.sort()
    print((candidates[0]))
else:
    print("UNRESTORABLE")

+# -*- coding: utf-8 -*- -len_S, len_T = len(S), len(T) - - -def judge(start): -    # print(S[start: start+len_T]) -    for j in range(len_T): -        if S[start + j] == "?": -            continue -        elif S[start + j] == T[j]: -            continue +candidates = [] +for i in range(len(S) - len(T) + 1): +    is_ok = True +    for j in range(len(T)): +        if S[i + j] == "?" or S[i + j] == T[j]: +            pass -            return False -    return True - - -for i in range(len_S - len_T, -1, -1): -    if judge(i): -        S = S[:i] + T + S[i + len_T :] -        S = S.replace("?", "a") -        print(S) -        exit() -print("UNRESTORABLE") +            is_ok = False +    # print(is_ok) +    if is_ok: +        candidate = S[:i] + T + S[i + len(T) :] +        candidate = candidate.replace("?", "a") +        candidates.append(candidate) +if candidates: +    candidates.sort() +    print((candidates[0])) +else: +    print("UNRESTORABLE")