#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string a, b;
  cin >> a >> b;
  map<char, long long int> da, db;
  long long int q = 0;
  for (char c : a) {
    c == '?' ? q++ : da[c]++;
  }
  for (char c : b) {
    db[c]++;
  }
  long long int ans = 0;
  long long int l = 0, r = a.size();
  while (l <= r) {
    long long int mid = (l + r) / 2;
    long long int qq = q;
    for (auto e : db) {
      long long int needed = e.second * mid;
      qq -= max((long long int)0, needed - da[e.first]);
    }
    if (qq < 0) {
      r = mid - 1;
    } else {
      ans = mid;
      l = mid + 1;
    }
  }
  map<char, long long int> just;
  for (char ch = 'a'; ch <= 'z'; ch++) {
    if (ans * db[ch] > da[ch]) {
      just[ch] = ans * db[ch] - da[ch];
    }
  }
  for (char c : a) {
    if (c == '?') {
      if (just.empty()) {
        cout << 'a';
        continue;
      }
      c = just.begin()->first;
      just.begin()->second--;
      if (just.begin()->second == 0) {
        just.erase(just.begin());
      }
    }
    cout << c;
  }
}
