#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
int const maxn = 3000005;
string st[maxn];
int ab[200], ac[200], ad[200];
char b[maxn], c[maxn], d[maxn];
int main() {
  cin >> b >> c;
  int lenc = strlen(c);
  for (int i = 0; i < lenc; i++) {
    ac[c[i] - 'a']++;
  }
  int tw = 0, t = 0;
  int lenb = strlen(b);
  for (int i = 0; i < lenb; i++) {
    if (b[i] == '?')
      tw++;
    else
      ab[b[i] - 'a']++;
  }
  while (tw > 0) {
    for (int i = 0; i < 26; i++) {
      if (tw == 0) break;
      if (ab[i] >= ac[i]) {
        ab[i] -= ac[i];
      } else {
        if (tw >= ac[i] - ab[i]) {
          tw -= ac[i] - ab[i];
          ad[i] += ac[i] - ab[i];
          ab[i] = 0;
        } else {
          ad[0] += tw;
          tw = 0;
        }
      }
    }
  }
  for (int i = 0; i < 26; i++) {
    for (int j = 0; j < ad[i]; j++) {
      d[t++] = (char)(i + 'a');
    }
  }
  t = 0;
  for (int i = 0; i < lenb; i++) {
    if (b[i] == '?') {
      cout << d[t++];
    } else
      cout << b[i];
  }
  cout << endl;
  return 0;
}
