#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s >> t;
  int n = s.length(), m = t.length();
  long long x[26] = {}, y[26] = {}, qu = 0;
  for (int i = 0; i < m; ++i) {
    x[t[i] - 'a']++;
  }
  for (int i = 0; i < n; ++i) {
    if (s[i] == '?')
      qu++;
    else
      y[s[i] - 'a']++;
  }
  long long ok = 0, ng = 1e8;
  while (ng - ok > 1) {
    long long mi = (ok + ng) / 2;
    long long a = 0;
    for (int i = 0; i < 26; ++i) a += max(0LL, x[i] * mi - y[i]);
    if (a <= qu)
      ok = mi;
    else
      ng = mi;
  }
  long long req[26] = {};
  for (int i = 0; i < 26; ++i) req[i] = max(0LL, x[i] * ok - y[i]);
  int j = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] != '?') continue;
    while (j < 26 && !req[j]) j++;
    if (j == 26)
      s[i] = 'a';
    else {
      s[i] = (j + 'a');
      req[j]--;
    }
  }
  cout << s << endl;
  return 0;
}
