#include <bits/stdc++.h>
using namespace std;
string s, t;
vector<long long> res;
long long cntt[27];
long long cnts[27];
long long cans;
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin >> s >> t;
  for (long long i = 0; i <= (long long)t.length() - 1; ++i) {
    ++cntt[t[i] - 'a' + 1];
  }
  for (long long i = 0; i <= (long long)s.length() - 1; ++i) {
    if (s[i] == '?') {
      res.push_back(i);
    } else {
      ++cnts[s[i] - 'a' + 1];
    }
  }
  while (!res.empty()) {
    cans = 1e9;
    for (long long i = 1; i <= 26; ++i) {
      if (cntt[i]) cans = min(cans, cnts[i] / cntt[i]);
    }
    for (long long i = 1; i <= 26; ++i) {
      if (cntt[i]) {
        if (cnts[i] / cntt[i] == cans) {
          long long idx = res.back();
          res.pop_back();
          ++cnts[i];
          s[idx] = (char)((int)'a' + i - 1);
          break;
        }
      }
    }
  }
  cout << s << '\n';
  return 0;
}
