#include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::ios;
using std::set;
using std::string;
using std::vector;

bool MatchString(char *a, char *b) {
  if (*a == '?') {
    return MatchString(a + 1, b + 1);
  } else if (*a != *b) {
    return false;
  } else if (*a == 0) {
    return true;
  } else {
    return MatchString(a + 1, b + 1);
  }
}

vector<string> MoveMatch(char *a, char *b) {
  int loc = 0;
  vector<string> ret;
  int la = 0, lb = 0;
  char *pa = a;
  while (a[la++] != 0) {
  };
  while (b[lb++] != 0) {
  };

  while (*a != 0) {
    if (MatchString(a, b)) {
      char c[55] = {0};
      for (int i = 0; i < la; i++) {
        c[i] = pa[i];
        if (c[i] == '?') {
          c[i] = 'a';
        }
      }
      for (int i = loc; i < loc + lb; i++) {
        c[i] = b[i - loc];
      }
      ret.push_back(string(c, la));
    }
    loc++, a++;
  }
  return ret;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string stsp, stt, sts;
  char sp[55] = {0}, t[55] = {0};
  while (cin >> stsp) {
    // cin >> stsp;
    cin >> stt;
    int lena = stsp.size(), lenb = stt.size();
    for (int i = 0; i < stsp.size(); i++) {
      sp[i] = stsp[i];
    }
    for (int i = 0; i < stt.size(); i++) {
      t[i] = stt[i];
    }
    auto ret = MoveMatch(sp, t);
    std::sort(ret.begin(), ret.end());
    // cout << loc << endl;
    if (ret.empty()) {
      cout << "UNRESTORABLE" << endl;
    } else {
      cout << ret[0] << endl;
    }
  }
  return 0;
}
