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
            }
        }
    };
}

// include last index.
fn index_window(vec_len: usize, window_size: usize, from_left: bool) -> Vec<(usize, usize)> {
    let mut v: Vec<(usize, usize)> = Vec::with_capacity(vec_len-window_size+1);
    if from_left {
        let mut left = 0;
        let mut right = window_size-1;
        loop {
            v.push((left, right));
            if right+1 == vec_len {
                break;
            }
            left += 1;
            right += 1;
        }
    } else {
        let mut left = vec_len-window_size+1;
        let mut right = vec_len-1;
        loop {
            v.push((left, right));
            if left == 0 {
                break;
            }
            left -= 1;
            right -=1 ;
        }        
    }
    v
}

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 = 0;
    let mut right = 0;
    let mut can_open = false;
    let mut windows = index_window(s_.len(), t.len(), true);
    while windows.len() != 0 {
        let window = windows.pop().unwrap();
        let chunk = s_.get(window.0..window.1+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;
            left = window.0;
            right = window.1;
            break;
        }
    }

    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