#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int i, ct, r;
  string s, t;
  int ct_left[26], ct_req[26];
  memset(ct_left, 0, sizeof(ct_left));
  memset(ct_req, 0, sizeof(ct_req));
  stack<char> ans;
  cin >> s >> t;
  ct = 0;
  for (i = 0; i < s.length(); i++) {
    if (s[i] == '?') {
      ct++;
    } else {
      ct_left[s[i] - 'a']++;
    }
  }
  for (i = 0; i < t.length(); i++) {
    ct_req[t[i] - 'a']++;
  }
  while (ct > 0) {
    for (i = 0; i < 26 && ct > 0; i++) {
      r = ct_req[i];
      while (r != 0 && ct > 0) {
        if (ct_left[i] > 0) {
          ct_left[i]--;
          r--;
        } else {
          ans.push((char)'a' + i);
          r--;
          ct--;
        }
      }
    }
  }
  for (i = 0; i < s.length(); i++) {
    if (s[i] == '?') {
      s[i] = ans.top();
      ans.pop();
    }
  }
  cout << s;
  return 0;
}
