#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t, ans;
  int c = 0, rc, tn, cn;
  cin >> s >> t;
  int sa[26] = {0}, ta[26] = {0}, qn = 0;
  int i, j, k;
  for (i = 0; i < s.length(); i++) {
    if (s[i] == '?')
      qn++;
    else
      sa[s[i] - 97]++;
  }
  for (i = 0; i < t.length(); i++) ta[t[i] - 97]++;
  while (1) {
    rc = 0;
    for (i = 0; i < 26; i++) {
      if (c * ta[i] > sa[i]) rc += c * ta[i] - sa[i];
    }
    if (rc > qn) break;
    c++;
  }
  c = max(c - 1, 0);
  j = 0;
  for (i = 0; i < 26; i++) {
    cn = 0;
    while (j < s.length() && cn < c * ta[i] - sa[i]) {
      if (s[j] == '?') {
        ans += (char)(i + 97);
        cn++;
      } else
        ans += s[j];
      j++;
    }
  }
  for (i = j; i < s.length(); i++) {
    if (s[i] == '?')
      ans += 'a';
    else
      ans += s[i];
  }
  cout << ans;
}
