f [] _ = (False, [])
f s@(c:u) t
  | not b && and (zipWith (\x y -> x == '?' || x == y) (s ++ repeat '_') t) = (True, t ++ drop (length t) v)
  | otherwise = (b, (if c == '?' then 'a' else c) : v)
  where (b,v) = f u t
main = do
  (b,s) <- f <$> getLine <*> getLine
  putStrLn $ "UNRESTORABLE"