{-# OPTIONS_GHC -O #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}

import Control.Monad
import Data.List

isp [] _ = True
isp _ [] = False
isp (t:tr) (s:sr)
    | s == '?' = isp tr sr
    | t == s = isp tr sr
    | True = False

fd t sp [] = []
fd t sp ss@(s:sr) =
    if isp t ss
        then (sp ++ t ++ (drop (length t) ss)) : fd t (sp++[s]) sr
        else fd t (sp++[s]) sr

main=do
    s <- getLine
    t <- getLine
    --
    let as = map (map (\c -> if c == '?' then 'a' else c)) $ fd t [] s
    --
    if null as then putStrLn "UNRESTORABLE"
    else putStrLn $ head $ sort as
