module Main where
import Control.Monad
import Control.Applicative
import Data.Maybe
import Data.List
import qualified Text.Printf
import qualified Data.ByteString.Char8 as BC
import qualified Data.ByteString as BC

------------------------------------------

main :: IO ()
main = do
  s' <- getLine
  trg <- getLine
  let find [] = []
      find xx@(x:xs) =
        case match xx of
          Nothing -> map (x':) (find xs)
          Just xx' -> xx' : map (x':) (find xs)
        where x' = if x == '?' then 'a' else x

      match str = go trg str
        where go [] ys = Just $ trg ++ fillA ys
              go _ [] = Nothing
              go (x:xs) (y:ys) = guard (y == '?' || x == y) >> go xs ys
              
              fillA = map (\x -> if x == '?' then 'a' else x)

      cands = find s'

  case sort cands of 
    []    -> putStrLn "UNRESTORABLE"
    (x:_) -> putStrLn x


------------------------------------------

{- Int input -}

parseInt :: BC.ByteString -> Int
parseInt = fst . fromJust . BC.readInt

parseInts :: BC.ByteString -> [Int]
parseInts = map parseInt <$> BC.words

readInt :: IO Int
readInt = parseInt <$> BC.getLine

readInts :: IO [Int]
readInts = parseInts <$> BC.getLine

{- Double Formatting -}

doubleFmt :: Double -> String
doubleFmt = Text.Printf.printf "%.12f"
