module Main where

import Control.Applicative
import Control.Monad
import Data.List
import Data.Bool (bool)

match :: String -> String -> Bool
match []     _      = True
match _      []     = False
match (a:as) (b:bs)
    | b == '?' || a == b = match as bs
    | otherwise          = False

main :: IO ()
main = do
    ss <- getLine
    ts <- getLine
    let n = length ss
    let ss' = reverse . tails $ ss
    case filter (match ts) ss' of
        []     -> putStrLn "UNRESTORABLE"
        (xs:_) -> do
            let a = ts ++ drop (length ts) xs
            let b = take (n - length a) ss ++ a
            let ans = fmap (\c -> bool c 'a' (c == '?')) b
            putStrLn ans