#include <bits/stdc++.h>
using namespace std;
int main(){
	string s,t;
	cin>>s;
	cin>>t;
	vector<string> possible;
	for(int i=0;i+t.size()<=s.size();i++){
		bool can = 1;
		for(int j = 0;j<t.size();j++){
			if (s[i+j]!= '?' && s[i+j] != t[j]){
				can = 0;
				break;
			}
		}
		if (can){
			string news = s;
			for(int j=0;j<t.size();j++){
				news[i+j] = t[j];
			}
			for(int i=0;i<news.size();i++){
				if (news[i] == '?'){
					news[i] = 'a';
				}
			}
			possible.push_back(news);
		}
	}
	if (possible.size() == 0){
		cout<<"UNRESTORABLE"<<endl;
		return 0;
	}
	string res = possible[0];
	for(int i=1;i<possible.size();i++){
		if (possible[i] <res){
			res = possible[i];
		}
	}
	cout<<res<<endl;
	return 0;
}