#include <bits/stdc++.h>
using namespace std;
string s, t;
int a[30], b[30], k, l;
int main() {
  cin >> s >> t;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '?')
      k++;
    else
      a[s[i] - 96]++;
  }
  for (int i = 0; i < t.size(); i++) b[t[i] - 96]++;
  for (int i = 1; i <= 26; i++) b[i] *= 1000;
  while (1) {
    int o = 0;
    for (int i = 1; i <= 26; i++)
      if (a[i] < b[i]) o += b[i] - a[i];
    if (o > k) break;
    k -= o;
    for (int i = 1; i <= 26; i++) {
      while (a[i] < b[i]) {
        a[i]++;
        while (s[l] != '?') l++;
        s[l] = (char)(i + 96);
      }
    }
    for (int i = 1; i <= 26; i++) a[i] -= b[i];
  }
  for (int i = 1; i <= 26; i++) b[i] /= 1000;
  while (1) {
    int o = 0;
    for (int i = 1; i <= 26; i++)
      if (a[i] < b[i]) o += b[i] - a[i];
    if (o > k) break;
    k -= o;
    for (int i = 1; i <= 26; i++) {
      while (a[i] < b[i]) {
        a[i]++;
        while (s[l] != '?') l++;
        s[l] = (char)(i + 96);
      }
    }
    for (int i = 1; i <= 26; i++) a[i] -= b[i];
  }
  for (int i = 0; i < s.size(); i++)
    if (s[i] == '?') s[i] = 'a';
  cout << s << endl;
  return 0;
}
