def main():

    S = input()

    T = input()

    N = len(S)

    M = len(T)

    for i in range(N-M+1)[::-1]:

        for s, t in zip(S[i:i+M], T):

            if s != t and s != "?":

                break

        else:

            return print(S[:i].replace("?", "a") + T + S[i+M:].replace("?", "a"))

    print("UNRESTORABLE")





if __name__ == '__main__':

    main()

def main():

    S = input()

    T = input()

    N = len(S)

    M = len(T)

    for i in range(N-M+1)[::-1]:

        if all(s == t or s == "?" for s, t in zip(S[i:i+M], T)):

            return print(S[:i].replace("?", "a") + T + S[i+M:].replace("?", "a"))

    print("UNRESTORABLE")





if __name__ == '__main__':

    main()

def main():
    S = input()
    T = input()
    N = len(S)
    M = len(T)
    for i in range(N - M + 1)[::-1]:
        for s, t in zip(S[i : i + M], T):
            if s != t and s != "?":
                break
        else:
            return print(S[:i].replace("?", "a") + T + S[i + M :].replace("?", "a"))
    print("UNRESTORABLE")


if __name__ == "__main__":
    main()

def main():
    S = input()
    T = input()
    N = len(S)
    M = len(T)
    for i in range(N - M + 1)[::-1]:
        if all(s == t or s == "?" for s, t in zip(S[i : i + M], T)):
            return print(S[:i].replace("?", "a") + T + S[i + M :].replace("?", "a"))
    print("UNRESTORABLE")


if __name__ == "__main__":
    main()

-        for s, t in zip(S[i : i + M], T): -            if s != t and s != "?": -                break -        else: +        if all(s == t or s == "?" for s, t in zip(S[i : i + M], T)):