#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  int cnt1[256] = {}, cnt2[256] = {}, toReplace[256] = {};
  cin >> s >> t;
  for (char c : s) ++cnt1[c];
  for (char c : t) ++cnt2[c];
  priority_queue<pair<int, int>, vector<pair<int, int>>,
                 greater<pair<int, int>>>
      pq;
  for (char x = 'a'; x <= 'z'; ++x)
    if (cnt2[x]) pq.push(pair<int, int>{cnt1[x] / cnt2[x], x});
  while (cnt1['?']) {
    --cnt1['?'];
    pair<int, int> p = pq.top();
    pq.pop();
    ++toReplace[p.second];
    ++cnt1[p.second];
    pq.push(pair<int, int>{cnt1[p.second] / cnt2[p.second], p.second});
  }
  toReplace['z'] += 1000000;
  for (char& c : s) {
    if (c == '?') {
      for (char x = 'a'; x <= 'z'; ++x) {
        if (toReplace[x]) {
          --toReplace[x];
          c = x;
          break;
        }
      }
    }
  }
  cout << s << endl;
  return 0;
}
