import re

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

t = eval(input())

lst = []

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

  if re.match(s[i:i+len(t)], t):

    lst.append(s[:i].replace('.','a')+t+s[i+len(t):].replace('.','a'))

if lst:

  print((min(lst)))

else:

  print('UNRESTORABLE')
import re

s = input().replace('?', '.')[::-1]

t = input()[::-1]

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

  if re.match(s[i:i+len(t)], t):

    print(((s[:i].replace('.','a')+t+s[i+len(t):].replace('.','a'))[::-1]))

    break

else:

  print('UNRESTORABLE')
import re

s = input().replace("?", ".")
t = eval(input())
lst = []
for i in range(len(s) - len(t) + 1):
    if re.match(s[i : i + len(t)], t):
        lst.append(s[:i].replace(".", "a") + t + s[i + len(t) :].replace(".", "a"))
if lst:
    print((min(lst)))
else:
    print("UNRESTORABLE")

import re

s = input().replace("?", ".")[::-1]
t = input()[::-1]
for i in range(len(s) - len(t) + 1):
    if re.match(s[i : i + len(t)], t):
        print(((s[:i].replace(".", "a") + t + s[i + len(t) :].replace(".", "a"))[::-1]))
        break
else:
    print("UNRESTORABLE")

-s = input().replace("?", ".") -t = eval(input()) -lst = [] +s = input().replace("?", ".")[::-1] +t = input()[::-1] -        lst.append(s[:i].replace(".", "a") + t + s[i + len(t) :].replace(".", "a")) -if lst: -    print((min(lst))) +        print(((s[:i].replace(".", "a") + t + s[i + len(t) :].replace(".", "a"))[::-1])) +        break