local S_dash=io.read()
local S=""
local T=io.read()

for i=#S_dash-#T+1,1,-1 do
    local subS=S_dash:sub(i,#T+i-1)
    local flag=true
    for j=1,#T do
        if subS:sub(j,j)~="?" and subS:sub(j,j)~=T:sub(j,j) then
            flag=false
        end
    end
    if flag then
        if S=="" then
            S=S_dash:sub(1,i-1)..T..S_dash:sub(#T+i)
            S=S:gsub("?","a")
        else
            local T=S_dash:sub(1,i-1)..T..S_dash:sub(#T+i)
            T=T:gsub("?","a")
            if S>T then
                S=T
            end
        end
    end
end

print(#S>0 and S or "UNRESTORABLE")