s, t = io.read('*l'), io.read('*l')

ans = nil

for i = 1, #s - #t + 1 do
    local ss = s:sub(1, i - 1) .. t .. s:sub(i + #t)
    local valid = true
    for j = 1, #s do
        if s:byte(j) ~= 63 and s:byte(j) ~= ss:byte(j) then
            valid = false; break
        end
    end
    if valid then
        local t = ss:gsub('?', 'a')
        if ans == nil or ans > t then ans = t end
    end
end

print(ans or 'UNRESTORABLE')
