import Data.Maybe
import Data.List

main = do
  s <- getLine
  t <- getLine
  putStrLn (maybe "UNRESTORABLE" id (key s t))

key s t = minimumSafe $ map (replace s t) $ mapMaybe (match t) ws
 where
   ws = zip [0..] (windows (length t) s)

minimumSafe xs
  | null xs = Nothing
  | otherwise = Just (minimum xs)

replace s t i = s1 ++ s2 ++ s3
  where
   sa = map (\c -> if c=='?' then 'a' else c) s
   (s1, s2, s3) = (take i sa, t, drop (i + length t) sa)

match t (i,w)
  | all (\(ct,cw) -> ct==cw || cw=='?') (zip t w) = Just i
  | otherwise = Nothing

windows k = takeWhile ((==k) . length) . map (take k) . tails