local a = io.read()
local b = io.read()
local alen, blen = #a, #b
local ret = nil

for i = 1, alen + 1 - blen do
  local accept = true
  for j = i, i + blen - 1 do
    local jb = j - i + 1
    local as, bs = a:sub(j, j), b:sub(jb, jb)
    if as ~= "?" and as ~= bs then
      accept = false break
    end
  end
  if accept then
    local str = ""
    for j = 1, alen do
      local jb = j - i + 1
      if jb < 1 or blen < jb then
        local as = a:sub(j, j)
        if as == "?" then as = "a" end
        str = str .. as
      else
        str = str .. b:sub(jb, jb)
      end
    end
    if not ret then
      ret = str
    elseif str < ret then
      ret = str
    end
  end
end
if not ret then print("UNRESTORABLE")
else print(ret) end
