Buggy python submission (verdict: Runtime Error):
s_d = input()
t = input()
s = "a"
for i in range(len(s_d) - len(t), -1, -1):
    possible = True
    for j in range(len(t)):
        if s_d[i + j] == t[j] or s_d[i + j] == "?":
            continue
        else:
            possible = False
            break
    if possible == False:
        continue
    else:
        s = s_d[:i] + t + s_d[i+len(t):]
        for k in range(len(s)):
            if s[k] == "?":
                s = s[:k] + "a" + s[k+1:]
        break
if possible == True:
    print(s)
else:
    print("UNRESTORABLE")

Fixed submission:
s_d = input()
t = input()
if len(s_d) >= len(t):
    for i in range(len(s_d) - len(t), -1, -1):
        possible = True
        for j in range(len(t)):
            if s_d[i + j] == t[j] or s_d[i + j] == "?":
                continue
            else:
                possible = False
                break
        if possible == False:
            continue
        else:
            s = s_d[:i] + t + s_d[i+len(t):]
            for k in range(len(s)):
                if s[k] == "?":
                    s = s[:k] + "a" + s[k+1:]
            break
else:
    possible = False
if possible == True:
    print(s)
else:
    print("UNRESTORABLE")

Buggy python submission (verdict: Runtime Error):
s_d = input()
t = input()
possible = True
for i in range(len(s_d) - len(t), -1, -1):
    for j in range(len(t)):
        if s_d[i + j] == t[j] or s_d[i + j] == "?":
            continue
        else:
            possible = False
            break
    if possible == False:
        continue
    else:
        s = s_d[:i] + t + s_d[i+len(t):]
        for k in range(len(s)):
            if s[k] == "?":
                s = s[:k] + "a" + s[k+1:]
        break
if possible == True:
    print(s)
else:
    print("UNRESTORABLE")

Fixed submission:
s_d = input()
t = input()
if len(s_d) >= len(t):
    for i in range(len(s_d) - len(t), -1, -1):
        possible = True
        for j in range(len(t)):
            if s_d[i + j] == t[j] or s_d[i + j] == "?":
                continue
            else:
                possible = False
                break
        if possible == False:
            continue
        else:
            s = s_d[:i] + t + s_d[i+len(t):]
            for k in range(len(s)):
                if s[k] == "?":
                    s = s[:k] + "a" + s[k+1:]
            break
else:
    possible = False
if possible == True:
    print(s)
else:
    print("UNRESTORABLE")

Buggy python submission (verdict: Runtime Error):
s_d = input()
t = input()
for i in range(len(s_d) - len(t), -1, -1):
    possible = True
    for j in range(len(t)):
        if s_d[i + j] == t[j] or s_d[i + j] == "?":
            continue
        else:
            possible = False
            break
    if possible == False:
        continue
    else:
        s = s_d[:i] + t + s_d[i+len(t):]
        for k in range(len(s)):
            if s[k] == "?":
                s = s[:k] + "a" + s[k+1:]
        break
if possible == True:
    print(s)
else:
    print("UNRESTORABLE")

Fixed submission:
s_d = input()
t = input()
if len(s_d) >= len(t):
    for i in range(len(s_d) - len(t), -1, -1):
        possible = True
        for j in range(len(t)):
            if s_d[i + j] == t[j] or s_d[i + j] == "?":
                continue
            else:
                possible = False
                break
        if possible == False:
            continue
        else:
            s = s_d[:i] + t + s_d[i+len(t):]
            for k in range(len(s)):
                if s[k] == "?":
                    s = s[:k] + "a" + s[k+1:]
            break
else:
    possible = False
if possible == True:
    print(s)
else:
    print("UNRESTORABLE")