main = do
    s' <- getLine
    t  <- getLine
    let (s, b) = restore s' t True
    putStrLn $ if b then map (\c->if c=='?' then 'a' else c) s
                    else "UNRESTORABLE"

restore s' t b = let
    (s, b') = restore' "" s' t
    in if s == s' then (s, b||b') else restore s t (b||b')

restore' sum [] _ = (sum, False) 
restore' sum s' t = if canReplace s' t && length s' >= length t
 then (reverse sum ++ t ++ drop (length t) s', True)
 else restore' (head s':sum) (tail s') t
 where
 canReplace _ [] = True
 canReplace [] _ = False
 canReplace (x:xs) (y:ys) = (x=='?' || x==y) && canReplace xs ys
    