import Control.Applicative
import Data.Maybe

main = solve <$> getLine <*> getLine >>= putStrLn . fromMaybe "UNRESTORABLE"

solve :: String -> String -> Maybe String
solve s t = maybeMinimum . map f . filter (check t . second) $ [ split i (i + length t) s | i <- [0..length s - length t] ]
  where
    f :: (String, String, String) -> String
    f (a, b, c) = replace '?' 'a' a ++ t ++ replace '?' 'a' c
    
    replace :: Eq a => a -> a -> [a] -> [a]
    replace u v = map (\x -> if x == u then v else x)

second :: (a, a, a) -> a
second (_, y, _) = y

maybeMinimum :: Ord a => [a] -> Maybe a
maybeMinimum [] = Nothing
maybeMinimum a = Just . minimum $ a

check :: String -> String -> Bool
check t = all (\(x, y) -> y == '?' || x == y) . zip t

split :: Int -> Int -> [a] -> ([a], [a], [a])
split l r s = let (m, c) = splitAt r s
                  (a, b) = splitAt l m
              in (a, b, c)