use std::io::BufRead;

pub struct StdinReader<R: BufRead> {
    pub buf_reader: R,
    pub buf: String,
}
impl<R: BufRead> StdinReader<R> {
    pub fn new(r: R) -> Self {
        StdinReader {
            buf_reader: r,
            buf: String::with_capacity(10000),
        }
    }
}

#[macro_export]
macro_rules! input {
    ($reader : expr, $t : ty) => { // one variable
        match &mut $reader {
            reader => {
                use std::io::BufRead;
                reader.buf_reader.read_line(&mut reader.buf).unwrap();
                let tmp_var: $t = reader.buf.trim().parse().unwrap(); 
                reader.buf.clear();
                tmp_var
            },
        }
    };
    ($reader : expr, $t0 : ty, $t1 : ty) => { // 2 tuple
        match &mut $reader {
            reader => {
                use std::io::BufRead;
                reader.buf_reader.read_line(&mut reader.buf).unwrap();
                let tmp_var: Vec<$t0> = reader.buf.trim().split_whitespace().map(|a| a.parse().unwrap()).collect();
                reader.buf.clear();
                (tmp_var[0], tmp_var[1])
            }
        }
    };
    ($reader : expr, $t0 : ty, $t1 : ty, $t2 : ty) => { // 3 tuple
        match &mut $reader {
            reader => {
                use std::io::BufRead;
                reader.buf_reader.read_line(&mut reader.buf).unwrap();
                let tmp_var: Vec<$t0> = reader.buf.trim().split_whitespace().map(|a| a.parse().unwrap()).collect();
                reader.buf.clear();
                (tmp_var[0], tmp_var[1], tmp_var[2])
            }
        }
    };
    ($reader : expr, $t : ty; $size : expr) => { // Vector
        match &mut $reader {
            reader => {
                use std::io::BufRead;
                reader.buf_reader.read_line(&mut reader.buf).unwrap();
                let tmp_var: $t = reader.buf.trim().split_whitespace().map(|a| a.parse().unwrap()).collect();
                reader.buf.clear();
                tmp_var
            }
        }
    };
}

fn main() {
    let handle = std::io::stdin();
    let mut r = StdinReader::new(handle.lock());

    let s_: Vec<char> = input!(r, String).chars().collect();
    let t: Vec<char> = input!(r, String).chars().collect();
    if s_.len() < t.len() { println!("{}", "UNRESTORABLE"); return;}
    let mut left = s_.len() - t.len();
    let mut right = s_.len()-1;
    let mut can_open = false;
    loop {
        let chunk = s_.get(left..right+1).unwrap();
        let mut is_chunk = true;
        for (i, c) in chunk.into_iter().enumerate() {
            if *c == '?' { continue; }
            if *c != t[i] {
                is_chunk = false;
                break;
            }
        }
        if is_chunk {
            can_open = true;
            break;
        }

        if left == 0 {
            break;
        }
        left -= 1;
        right -= 1;
    }

    if can_open {
        let mut s_hat = "".to_string();
        let mut ti = 0;
        for (i, c) in s_.into_iter().enumerate() {
            if left <= i && i <= right {
                s_hat.push(t[ti]);
                ti += 1;
            } else if c == '?' {
                s_hat.push('a');
            } else {
                s_hat.push(c);
            }
        }
        println!("{}", s_hat);
    } else {
        println!("{}", "UNRESTORABLE");
    }
}


Measured memory_bytes: 4352