#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  getline(cin, s1);
  getline(cin, s2);
  long long i, j, kol = 0, a[26] = {}, b[26] = {};
  long long n = s1.length(), m = s2.length(), mix = 1, y;
  for (i = 0; i < n; i++) {
    if (s1[i] == '?')
      kol++;
    else
      a[(s1[i] - 'a')]++;
  }
  for (i = 0; i < m; i++) {
    b[(s2[i] - 'a')]++;
  }
  while (kol) {
    y = 0;
    for (i = 0; i < 26; i++) {
      if (b[i] && a[i] < b[i] * mix) {
        a[i]++;
        y = 1;
        kol--;
        break;
      }
    }
    if (y == 0) mix++;
  }
  for (i = 0; i < n; i++) {
    if (s1[i] != '?') {
      a[s1[i] - 'a']--;
    }
  }
  for (i = 0; i < n; i++) {
    if (s1[i] != '?') {
      cout << s1[i];
    } else {
      for (j = 0; j < 26; j++)
        if (a[j]) {
          a[j]--;
          cout << (char)(j + 'a');
          break;
        }
    }
  }
  cout << endl;
  return 0;
}
