#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  string s, t;
  long long int a[26] = {}, b[26] = {}, c = 0;
  cin >> s >> t;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '?')
      c++;
    else
      a[s[i] - 'a']++;
  }
  for (int i = 0; i < t.length(); i++) b[t[i] - 'a']++;
  long long int l = 0, r = 1000006;
  while (l + 1 < r) {
    long long int m = (l + r) >> 1, d = 0;
    for (int i = 0; i < 26; i++)
      if (a[i] < b[i] * m) d += b[i] * m - a[i];
    if (d > c)
      r = m;
    else
      l = m;
  }
  for (int i = 0; i < s.length(); i++)
    if (s[i] == '?') {
      for (int j = 0; j < 26; j++)
        if (a[j] < b[j] * l) {
          s[i] = j + 'a';
          a[j]++;
          break;
        }
      if (s[i] == '?') s[i] = 'a';
    }
  cout << s;
}
