{-# LANGUAGE OverloadedStrings #-}

import Data.Monoid
import Control.Applicative
import Data.Maybe

main :: IO ()
main = do
    s <- getLine
    t <- getLine
    putStrLn . rep . fromMaybe "UNRESTORABLE" $ restore s t

restore :: String -> String -> Maybe String
restore "" t = Nothing
restore s t = let
    in if take (length t) s `eq` t 
           then ((head s :) <$> restore (drop 1 s) t) <|> Just (t <> rep (drop (length t) s))
           else ((head s :) <$> restore (drop 1 s) t)

rep :: String -> String
rep = map (\c -> if c=='?' then 'a' else c) 

eq :: String -> String -> Bool
eq "" "" = True
eq "" _  = False
eq _ ""  = False
eq ss ts = (head ss == head ts || head ss == '?') && eq (tail ss) (tail ts)
