search :: Int -> String -> String -> Int
search p s t
  | p < 0 = -1
  | res = p
  | otherwise = search (p - 1) s t
    where res = check $ zip t (drop p s)

check :: [(Char, Char)] -> Bool
check [] = True
check ((t, s):tss)
  | s == '?' = check tss
  | t == s = check tss
  | otherwise = False

solve :: Int -> String -> String -> String
solve p s t = res
  where replaced = take p s ++ t ++ drop (p + length t) s
        res = map (\c -> if c == '?' then 'a' else c) replaced

main :: IO ()
main = do
  s <- getLine
  t <- getLine
  let p = length s - length t
  let res = search p s t
  putStrLn $ if res >= 0
             then solve res s t
             else "UNRESTORABLE"