S=eval(input())

T=eval(input())





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

    cnt=0

    for j in range(len(T)):

        if S[len(S)-len(T)-i+j]=="?":

            cnt+=1

        else:

            if S[len(S)-len(T)-i+j]==T[j]:

                cnt+=1

    if len(T)==cnt:

        ANS=S[:len(S)-len(T)-i]+T+S[len(S)-i:]

        ANS=ANS.replace("?","a")

        print(ANS)

        exit()

    

print("UNRESTORABLE")
s=list(eval(input()))

T=list(eval(input()))



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

    F=0

    for j in range(len(T)):

        if s[len(s)-1-i-j]==T[len(T)-j-1] or s[len(s)-1-i-j]=="?":

            continue

        else:

            F=1

            break

    if F==0:

        for j in range(len(T)):

            if s[len(s)-1-i-j]=="?":

                s[len(s)-1-i-j]=T[len(T)-j-1]

        

        for j in range(len(s)):

            if s[j]=="?":

                s[j]="a"

        print(("".join(s)))

        exit()

print("UNRESTORABLE")

S = eval(input())
T = eval(input())
for i in range(len(S) - len(T) + 1):
    cnt = 0
    for j in range(len(T)):
        if S[len(S) - len(T) - i + j] == "?":
            cnt += 1
        else:
            if S[len(S) - len(T) - i + j] == T[j]:
                cnt += 1
    if len(T) == cnt:
        ANS = S[: len(S) - len(T) - i] + T + S[len(S) - i :]
        ANS = ANS.replace("?", "a")
        print(ANS)
        exit()
print("UNRESTORABLE")

s = list(eval(input()))
T = list(eval(input()))
for i in range(len(s) - len(T) + 1):
    F = 0
    for j in range(len(T)):
        if s[len(s) - 1 - i - j] == T[len(T) - j - 1] or s[len(s) - 1 - i - j] == "?":
            continue
        else:
            F = 1
            break
    if F == 0:
        for j in range(len(T)):
            if s[len(s) - 1 - i - j] == "?":
                s[len(s) - 1 - i - j] = T[len(T) - j - 1]
        for j in range(len(s)):
            if s[j] == "?":
                s[j] = "a"
        print(("".join(s)))
        exit()
print("UNRESTORABLE")

-S = eval(input()) -T = eval(input()) -for i in range(len(S) - len(T) + 1): -    cnt = 0 +s = list(eval(input())) +T = list(eval(input())) +for i in range(len(s) - len(T) + 1): +    F = 0 -        if S[len(S) - len(T) - i + j] == "?": -            cnt += 1 +        if s[len(s) - 1 - i - j] == T[len(T) - j - 1] or s[len(s) - 1 - i - j] == "?": +            continue -            if S[len(S) - len(T) - i + j] == T[j]: -                cnt += 1 -    if len(T) == cnt: -        ANS = S[: len(S) - len(T) - i] + T + S[len(S) - i :] -        ANS = ANS.replace("?", "a") -        print(ANS) +            F = 1 +            break +    if F == 0: +        for j in range(len(T)): +            if s[len(s) - 1 - i - j] == "?": +                s[len(s) - 1 - i - j] = T[len(T) - j - 1] +        for j in range(len(s)): +            if s[j] == "?": +                s[j] = "a" +        print(("".join(s)))