import sys





def solve():

    readline = sys.stdin.buffer.readline

    mod = 10 ** 9 + 7

    s = str(readline().rstrip().decode('utf-8'))

    t = str(readline().rstrip().decode('utf-8'))

    k = len(t)

    for i in range(len(s) - k, -1, -1):

        ts = s[i:i+k]

        b = True

        for j in range(k):

            if ts[j] != "?" and ts[j] != t[j]:

                b = False

                break

        if b:

            a = []

            f = True

            for j in range(len(s)):

                if j < i or i + k <= j:

                    if s[j] == "?":

                        a.append("a")

                    else:

                        a.append(s[j])

                else:

                    if f:

                        a = a + list(t)

                        f = False

            print(("".join(a)))

            exit()

    print("UNRESTORABLE")





if __name__ == '__main__':

    solve()

import sys





def solve():

    readline = sys.stdin.buffer.readline

    mod = 10 ** 9 + 7

    s = str(readline().rstrip().decode('utf-8'))

    t = str(readline().rstrip().decode('utf-8'))

    lt = len(t)

    for i in range(len(s) - lt, -1, -1):

        ts = s[i:i+lt]

        b = True

        for j in range(len(ts)):

            if ts[j] != "?" and ts[j] != t[j]:

                b = False

                break

        if b:

            ans = []

            for j in range(len(s)):

                if i <= j < i + lt:

                    ans.append(t[j-i])

                else:

                    if s[j] == "?":

                        ans.append("a")

                    else:

                        ans.append(s[j])

            print(("".join(ans)))

            exit()

    print("UNRESTORABLE")





if __name__ == '__main__':

    solve()

import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10**9 + 7
    s = str(readline().rstrip().decode("utf-8"))
    t = str(readline().rstrip().decode("utf-8"))
    k = len(t)
    for i in range(len(s) - k, -1, -1):
        ts = s[i : i + k]
        b = True
        for j in range(k):
            if ts[j] != "?" and ts[j] != t[j]:
                b = False
                break
        if b:
            a = []
            f = True
            for j in range(len(s)):
                if j < i or i + k <= j:
                    if s[j] == "?":
                        a.append("a")
                    else:
                        a.append(s[j])
                else:
                    if f:
                        a = a + list(t)
                        f = False
            print(("".join(a)))
            exit()
    print("UNRESTORABLE")


if __name__ == "__main__":
    solve()

import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10**9 + 7
    s = str(readline().rstrip().decode("utf-8"))
    t = str(readline().rstrip().decode("utf-8"))
    lt = len(t)
    for i in range(len(s) - lt, -1, -1):
        ts = s[i : i + lt]
        b = True
        for j in range(len(ts)):
            if ts[j] != "?" and ts[j] != t[j]:
                b = False
                break
        if b:
            ans = []
            for j in range(len(s)):
                if i <= j < i + lt:
                    ans.append(t[j - i])
                else:
                    if s[j] == "?":
                        ans.append("a")
                    else:
                        ans.append(s[j])
            print(("".join(ans)))
            exit()
    print("UNRESTORABLE")


if __name__ == "__main__":
    solve()

-    k = len(t) -    for i in range(len(s) - k, -1, -1): -        ts = s[i : i + k] +    lt = len(t) +    for i in range(len(s) - lt, -1, -1): +        ts = s[i : i + lt] -        for j in range(k): +        for j in range(len(ts)): -            a = [] -            f = True +            ans = [] -                if j < i or i + k <= j: +                if i <= j < i + lt: +                    ans.append(t[j - i]) +                else: -                        a.append("a") +                        ans.append("a") -                        a.append(s[j]) -                else: -                    if f: -                        a = a + list(t) -                        f = False -            print(("".join(a))) +                        ans.append(s[j]) +            print(("".join(ans)))