newtype FazzyChar   = FazzyChar {getFazzyChar :: Char}
type FazzyString = [FazzyChar]

instance Eq FazzyChar where
    FazzyChar '?' == FazzyChar _   = True
    FazzyChar _   == FazzyChar '?' = True
    FazzyChar c   == FazzyChar c'  = c == c'

main :: IO ()
main = do
    s <- getLine :: IO String
    t <- fromString <$> getLine :: IO FazzyString
    let str = map getFazzyChar $ restore (fromString s) t
    putStrLn $ if s == str then "UNRESTORABLE" else minString str

fromString :: String -> FazzyString
fromString = map FazzyChar

minString :: String -> String
minString = map (\c -> if c == '?' then 'a' else c)

restore s k = let
    ans = restore' s k
    in if ans == s then ans else restore ans k

restore' :: FazzyString -> FazzyString -> FazzyString
restore' [] _ = []
restore' fs key = if canConcertaion fs key
    then key ++ drop (length key) fs
    else head fs : restore' (tail fs) key
    where 
    canConcertaion _ [] = True
    canConcertaion [] _ = False
    canConcertaion (f:fs) (k:key) = (f == k) && canConcertaion fs key