{-# LANGUAGE OverloadedStrings #-}

import qualified Data.ByteString.Char8 as B
import Data.List

solve :: B.ByteString -> B.ByteString -> B.ByteString -> B.ByteString
solve s t acc
    | B.null s = "UNRESTORABLE"
    | lt /= ls = "UNRESTORABLE"
    | res = B.append (conv ds) $ B.append (B.reverse t) (conv acc)
    | otherwise = solve (B.tail s) t (B.sonc acc (B.head s))
    where
        res = and $ B.zipWith search ts t
        ts = B.take lt s
        ds = B.drop lt s
        lt = B.length t
        ls = B.length ts
        search a b
            | a == '?' = True
            | a == b = True
            | otherwise = False
        conv xs = B.foldl' (\acc x -> if x == '?' then B.cons 'a' acc else B.cons x acc) "" xs

main = do
    s <- B.getLine
    t <- B.getLine
    B.putStrLn $ solve (B.reverse s) (B.reverse t) ""