fun main(args: Array<String>) {
    val s = readLine()!!
    val t = readLine()!!
    val positions = ((s.length - t.length) downTo 0).filter { p -> (0 until t.length).all { s[it + p] == '?' || s[it + p] == t[it] }}
        .map { p -> s.substring(0, p) + t + s.substring(p + t.length) }
        .sorted()
    if (positions.isEmpty()) {
        println("UNRESTORABLE")
        return
    }
    println(positions.first().replace('?', 'a'))
}
