#include <iostream>
#include <string>
#include <vector>
#include <numeric>
#include <queue>
#include <unordered_map>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <sstream>
#include <stack>
#include <map>
#include <set>
#include <ios>
#include <cctype>
#include <cstdio>
#include <functional>
#include <cassert>

#define REP(i,a) for(int i = 0;i < (a);++i)
#define FOR(i,a,b) for(int i = (a);i < (b); ++i)
#define FORR(i,a,b) for(int i = (a) - 1;i >=(b);--i)
#define ALL(obj) (obj).begin(),(obj).end()
#define SIZE(obj) (int)(obj).sizeT()
#define YESNO(cond,yes,no){cout <<((cond)?(yes):(no))<<endl; }
#define SORT(list) sort(ALL((list)));
#define RSORT(list) sort((list).rbegin(),(list).rend())
#define ASSERT(cond,mes) assert(cond && mes)

using namespace std;
using ll = long long;

constexpr int mod = 1'000'000'007;
constexpr int INF = 1'050'000'000;

template<typename T>
T round_up(const T& a, const T& b) {
    return (a + (b - 1)) / b;
}

template <typename T1, typename T2>
istream& operator>>(istream& is, pair<T1, T2>& p) {
    is >> p.first >> p.second;
    return is;
}

template <typename T1, typename T2>
ostream& operator<<(ostream& os, pair<T1, T2>& p) {
    os << p.first << p.second;
    return os;
}

template <typename T>
istream& operator>>(istream& is, vector<T>& v) {
    REP(i, (int)v.size())is >> v[i];
    return is;
}

template <typename T>
ostream& operator<<(ostream& os, vector<T>& v) {
    REP(i, (int)v.size())os << v[i] << endl;
    return os;
}

template <typename T>
T clamp(T& n, T a, T b) {
    if (n < a)n = a;
    if (n > b)n = b;
    return n;
}

template <typename T>
static T GCD(T u, T v) {
    T r;
    while (v != 0) {
        r = u % v;
        u = v;
        v = r;
    }
    return u;
}

template <typename T>
static T LCM(T u, T v) {
    return u * v / gcd(u, v);
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    std::cout << fixed << setprecision(20);

    string S, T;
    cin >> S >> T;

    const int sizeS = S.length();
    const int sizeT = T.length();
    set<string> ans;
    REP(i, sizeT) {
        int pos = S.find(T[i]);
        while (pos != string::npos) {
            if (pos - i < 0) {
                pos = S.find(T[i], pos + 1);
                continue;
            }
            if (pos + (sizeT - i) > sizeS) {
                pos = S.find(T[i], pos + 1);
                continue;
            }

            bool flag = true;
            string s(S);
            REP(j, sizeT) {
                int k = pos - i + j;
                if (!(s[k] == T[j] || s[k] == '?')) {
                    flag = false;
                    break;
                }
                else s[k] = T[j];
            }
            if (!flag) {
                pos = S.find(T[i], pos + 1);
                continue;
            }
            REP(j, sizeS) {
                if (s[j] == '?')s[j] = 'a';
            }
            ans.emplace(s);
            pos = S.find(T[i], pos + 1);
        }
    }

    string h(sizeT, '?');
    int pos = S.find(h);
    while (pos != string::npos) {
        string s(S);
        REP(i, sizeT) {
            s[pos + i] = T[i];
        }
        REP(i, sizeS) {
            if (s[i] == '?')s[i] = 'a';
        }
        ans.emplace(s);
        pos = S.find(h, pos + 1);

    }

    if (ans.size() == 0) {
        cout << "UNRESTORABLE" << endl;
    }
    else {
        cout << *ans.begin() << endl;
    }
    return 0;
}

Measured memory_bytes: 256