implicit none
character(50) :: sp, t
integer :: nsp, nt
integer :: i,j,k
logical :: flg

read *,sp
read *,t

nsp = len_trim(sp)
nt = len_trim(t)

k = 0
do i = 1, nsp-nt+1
   flg = .true.
   do j = 1, nt
      if (sp(i+j-1:i+j-1) == '?') cycle
      if (sp(i+j-1:i+j-1) /= t(j:j)) then
         flg = .false.
         exit
      endif
   enddo
   if (flg) then
      k = i
   endif
enddo

if (k == 0) then
   print '(a)','UNRESTORABLE'
   stop
endif

i = 1
do while (i <= nsp)
   if (i == k) then
      write(6,'(a)',advance='no') trim(t)
      i = i + nt
      cycle
   endif
   if (sp(i:i) == '?') then
      write(6,'(a)',advance='no') 'a'
   else
      write(6,'(a)',advance='no') sp(i:i)
   endif
   i = i + 1
enddo
write(6,'(a)') ''
stop
end