object Main extends App {
	val N = scala.io.StdIn.readLine.toArray
	val K = scala.io.StdIn.readLine.toArray

	val KK = Array.ofDim[Char](K.size,K.size)
	for(i<-0 until K.size){
		for(j<-0 until K.size){
			KK(i)(j) = '?'
		}
		KK(i)(i) = K(i)
	}

	var flag = false
	var t = 0

	while(!flag && t < K.size){
		flag = N.mkString.contains(KK(t).mkString) || flag
		t = t + 1;
	}

	if(flag){
		val A = N.mkString.replace(KK(t-1).mkString,K.mkString)
		println(A.replaceAllLiterally("?","a"))
	}else{
		println("UNRESTORABLE")
	}
}