
import Data.List
import Data.Ord

main :: IO ()
main = getLine >>= main'
    where
        main' s = getLine >>= putStrLn . solve s

solve :: String -> String -> String
solve s t
    | null res = "UNRESTORABLE"
    | otherwise = snd $ head res
    where
        m = length s
        n = length t

        res = sortBy (comparing snd) . filter fst $ gen s t m n

gen :: String -> String -> Int -> Int -> [(Bool, String)]
gen s@('?' : xs) t m n
    | n > m = [(False, fmap mf s)]
    | check t s = fmap mf2 next `mappend` fmap mf3 next2
    | otherwise = fmap mf2 next
    where
        next = gen xs t (m - 1) n
        next2 = gen (drop n s) t (m - n) n
        mf c
            | c == '?' = 'a'
            | otherwise = c
        mf2 (b, ns) = (b, 'a' : ns)
        mf3 (_, ns) = (True, t `mappend` ns)

gen s@(x : xs) t m n
    | n > m = [(False, fmap mf s)]
    | check t s = fmap mf2 next `mappend` fmap mf3 next2
    | otherwise = fmap mf2 next
    where
        next = gen xs t (m - 1) n
        next2 = gen (drop n s) t (m - n) n
        mf c
            | c == '?' = 'a'
            | otherwise = c
        mf2 (b, ns) = (b, x : ns)
        mf3 (_, ns) = (True, t `mappend` ns)
gen _ _ _ _= [(False, [])]


check :: String -> String -> Bool
check (x : xs) (y : ys)
    | y == '?' || x == y = check xs ys
    | otherwise = False
check _ _ = True
