my_equal::Char->Char->Bool
my_equal c d = case (c,d) of
              ('?',_) -> True
              (_,'?') -> True
              (a,b)   -> a==b

try_gen::String->String->Maybe String
try_gen rest   []      = Just rest
try_gen []     (y:rest)  = Nothing
try_gen (x:xs) (y:ys)  = if my_equal x y then case try_gen xs ys of
                                                Nothing   -> Nothing
                                                Just rest -> Just (y:rest)
                                         else Nothing

total_case::String->String->[Maybe String]
total_case [] t = []
total_case (s:ss) t = (try_gen (s:ss) t):(map (\x -> case x of
                                                      Nothing -> Nothing
                                                      Just st -> Just (s:st)) (total_case ss t))

solver::String->String->String
solver s t = let ls =  filter (Nothing/=) (total_case s t) in
             case ls of
                []        -> "UNRESTORABLE"
                otherwise -> let Just str = last ls in map (\c-> if c =='?' then 'a' else c) str

main::IO()
main=do
  s<-getLine
  t<-getLine
  putStr (solver s t)
  putStr "\n"