//076 
#include <bits/stdc++.h>
#define rep(i ,n) for(int i=0;i<(int)(n);++i)
using namespace std;
typedef long long int int64;
typedef unsigned long long uint64;
 
int main(){
    string s , t;
    cin >> s >> t;
    int i , j , k;
    bool flag[51]={false};
    int counter[51]={0};
    for( i = 0 ; i < s.size() ; ++i){
        if(s[i] == '?') flag[i] = true;
    }
    i = 0; j = i;
    while(i < s.size()){
        while(!flag[i]){ ++i; ++j; }
        while(flag[i]){ ++i; ++counter[j]; }
        j = i;
    }
    bool replace = false;
    bool replace2 = false;
    bool rep_able = false;
    bool non_unknown = true;
    bool original = true;
    string s1;
    s1 = s;
    for(i = 0; i < s.size() ; ++i){
        if(s[i] == '?') { non_unknown = false; original = false; break;}
    }
    if(non_unknown){
        if(s.find(t) == string::npos) original = false;
    }
    for( i = 0 ; i < s.size(); ++i){
        if(s[i] == t[0]){
            for(j = 0 ; j < t.size() ; ++j){
                if( i + j >= s.size()) break;
                if(s[ i + j ] != t[j]){
                    rep_able = false;
                    break;
                }
                rep_able = true;
            }

        }
        if(rep_able){
            for( i = 0 ; i < s.size() ; ++i){
                if(s[i] == '?') { s1[i] = 'a'; replace = true; }
            }
        }
    }

    for( i = s.size()-1 ; i >= 0 ; --i){
        if(s[i] == t[t.size() - 1] && !replace){
            for( j = 1 ; j <= t.size() - 1 ; ++j){
                if( s[i - j] == t[t.size() - 1 - j] || s[i - j] == '?' ) rep_able = true;
                else { rep_able = false; break; }
            }
        }
        if(rep_able){
            for( j = 1 ; j <= t.size() - 1 ; ++j){
                if( s[i - j] == '?') { s1[i - j] = t[t.size() - 1 - j]; replace = true; } 
            }
        }
        rep_able = false;
    }
    if(replace){
        for( i = 0 ; i <= s1.size() -1 ; ++i){
            if(s1[i] == '?') s1[i] = 'a';
        }
        replace2 = true;
    }
    for(int i = s1.size()-1 ; i >= 0 ; --i){
        if((s1[i] == t[0]||s[i]=='?') &&!replace ){
            for( j = 1 ; j <= t.size() - 1 ; ++j){
                if( i + j >= s.size()) { rep_able = false; break; }
                if(( s1[i + j] == t[j] || s1[i + j] == '?' ) && !replace2 ) rep_able = true;
                else {rep_able = false; break;}
            }
        }
        if(rep_able){
            for( j = 0 ; j <= t.size() - 1 ; ++ j){
                if( i + j >= s.size()) break;
                if( s1[i + j] == '?'){ s1[i + j] = t[j]; replace = true; }
            }
        }
        rep_able = false;
    }
    if(replace){
        for( i = 0 ; i <= s1.size() - 1 ; ++i){
            if(s1[i] == '?') s1[i] = 'a';
        }
    }
    for( i = s.size() - 1 ; i >=0 ; --i){
        if(flag[i]) {
            if(counter[i] == 0 ) continue;
            else if(counter[i]>=t.size() && !replace){
                for ( j = t.size()-1 , k = 1; j >=0 ; --j , ++k){
                    s1[i + counter[i] - k] = t[j];
                }
                replace = true;
            }
        }
    }
    if(replace){
        for( i = 0 ; i <= s.size() - 1 ; ++i){
            if(s1[i] == '?') s1[i] = 'a';
        }
    }

    if( s == s1 && !original ) cout << "UNRESTORABLE" << endl;
    else cout << s1 << endl;
}

Measured memory_bytes: 256