#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 1000005;
char s[MAXN], t[MAXN];
int tch[26], sch[26], ns, nt;
int lch[26], tmp[26];
int main() {
  scanf("%s", s);
  ns = strlen(s);
  scanf("%s", t);
  nt = strlen(t);
  int cntq = 0;
  for (int i = (0); i < (nt); i++) tch[t[i] - 'a']++;
  for (int i = (0); i < (ns); i++) {
    if (s[i] == '?')
      cntq++;
    else
      sch[s[i] - 'a']++;
  }
  int c = 0;
  for (int i = (1); i < (ns + 1); i++) {
    int cnt = 0;
    for (int j = (0); j < (26); j++) {
      if (tch[j] * i > sch[j]) tmp[j] = tch[j] * i - sch[j], cnt += tmp[j];
    }
    if (cnt > cntq)
      break;
    else {
      for (int j = (0); j < (26); j++) lch[j] = tmp[j];
    }
  }
  int j = 0;
  for (int i = (0); i < (ns); i++) {
    while (j < 26 && lch[j] <= 0) j++;
    if (s[i] == '?') {
      if (j < 26 && lch[j] > 0)
        lch[j]--, s[i] = 'a' + j;
      else
        s[i] = 'a';
    }
  }
  cout << s << endl;
}
