import Data.List

main = putStrLn . solve . lines =<< getContents

solve [s,t] = f s
    where
        f s'
            | length s' < length t = "UNRESTORABLE"
            | t `isSuffixOf'` s' = repl $ (s' `takeTo` t) ++ t
            | otherwise = f (tail s')
        repl [] = []
        repl ('?':ss) = 'a':repl ss
        repl (s:ss) = s:repl ss
        takeTo a b = take (diff a b) a
        dropTo a b = drop (diff a b) a
        diff a b = length a - length b
        isSuffixOf' a b = and $ zipWith c (b `dropTo` a) a
            where
                c '?' _ = True
                c sc tc = sc == tc
