import Data.List
main=do
 s<-getLine;t<-getLine
 putStrLn[if c=='?' then 'a' else c|c<-(((sort(f s (length s) s (length s) t (length t)))++["UNRESTORABLE"])!!0)]
  where f o w s n t m = if n<m then [] else ((if (h (take m s) t m) then [(take (w-n) o)++t++(drop m s)] else [])++(f o w (tail s) (n-1) t m))
        h a b m = if m==0 then True else (if (head a)=='?'||(head a)==(head b) then (h (tail a) (tail b) (m-1)) else False)