let s' = read_line ()
let t = read_line ()
let f = String.map (function '?' -> 'a' | c -> c)
let n, m, u = String.(length s', length t, ref "")
let _ = String.(for i = n - m downto 0 do let b = ref true in u := init m (fun j -> match s'.[i + j] with '?' -> t.[j] | c -> if c <> t.[j] then b := false; c);
  if !b then (print_endline @@ (f @@ sub s' 0 i) ^ !u ^ (f @@ sub s' (i + m) @@ n - i - m); exit 0) done); print_endline "UNRESTORABLE"