import re

  

# 正解法   S=?b?? T=ab -> ans:abaa

def solve(s, t):

    s = s.replace('?', '.')

    ls, lt = len(s), len(t)

    if ls < lt:

        return 'UNRESTORABLE'

    ans = []

    for i in range(ls - lt + 1):

        m = re.match(s[i:i + lt], t)

        if m is None:

            continue

        ans.append((s[:i] + t + s[i + lt:]).replace('.', 'a'))

    if not ans:

        return 'UNRESTORABLE'

    return min(ans)

  

  

s = input().strip()

t = input().strip()

  

print((solve(s, t)))
def is_word(i):

  # T文字の長さを切り取り

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

  for s, t in zip(sub_S, T):

    if s == "?":

      continue

    if s != t:

      return False

  return True



S = eval(input())

rep_S = S.replace("?", "a")

T = eval(input())



word_L = []

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

  if is_word(i):

    s = rep_S[:i] + T + rep_S[i+len(T):]

    word_L.append(s)



ans = "UNRESTORABLE"

if word_L:

  ans = sorted(word_L)[0]

print(ans)  

  
import re

# 正解法   S=?b?? T=ab -> ans:abaa
def solve(s, t):
    s = s.replace("?", ".")
    ls, lt = len(s), len(t)
    if ls < lt:
        return "UNRESTORABLE"
    ans = []
    for i in range(ls - lt + 1):
        m = re.match(s[i : i + lt], t)
        if m is None:
            continue
        ans.append((s[:i] + t + s[i + lt :]).replace(".", "a"))
    if not ans:
        return "UNRESTORABLE"
    return min(ans)


s = input().strip()
t = input().strip()
print((solve(s, t)))

def is_word(i):
    # T文字の長さを切り取り
    sub_S = S[i : i + len(T)]
    for s, t in zip(sub_S, T):
        if s == "?":
            continue
        if s != t:
            return False
    return True


S = eval(input())
rep_S = S.replace("?", "a")
T = eval(input())
word_L = []
for i in range(len(S) - len(T) + 1):
    if is_word(i):
        s = rep_S[:i] + T + rep_S[i + len(T) :]
        word_L.append(s)
ans = "UNRESTORABLE"
if word_L:
    ans = sorted(word_L)[0]
print(ans)

-import re - -# 正解法   S=?b?? T=ab -> ans:abaa -def solve(s, t): -    s = s.replace("?", ".") -    ls, lt = len(s), len(t) -    if ls < lt: -        return "UNRESTORABLE" -    ans = [] -    for i in range(ls - lt + 1): -        m = re.match(s[i : i + lt], t) -        if m is None: +def is_word(i): +    # T文字の長さを切り取り +    sub_S = S[i : i + len(T)] +    for s, t in zip(sub_S, T): +        if s == "?": -        ans.append((s[:i] + t + s[i + lt :]).replace(".", "a")) -    if not ans: -        return "UNRESTORABLE" -    return min(ans) +        if s != t: +            return False +    return True -s = input().strip() -t = input().strip() -print((solve(s, t))) +S = eval(input()) +rep_S = S.replace("?", "a") +T = eval(input()) +word_L = [] +for i in range(len(S) - len(T) + 1): +    if is_word(i): +        s = rep_S[:i] + T + rep_S[i + len(T) :] +        word_L.append(s) +ans = "UNRESTORABLE" +if word_L: +    ans = sorted(word_L)[0] +print(ans)