#include <bits/stdc++.h>
using namespace std;
char s[1000010], t[1000010];
int a[30], b[30];
int ls, lt;
int idx(char c) { return c - 'a'; }
int pos[1000010], len = 0;
void init() {
  for (int i = 0; i < ls; i++) {
    if (s[i] != '?')
      a[idx(s[i])]++;
    else
      pos[len++] = i;
  }
  for (int i = 0; i < lt; i++) b[idx(t[i])]++;
}
int main() {
  scanf("%s%s", s, t);
  ls = strlen(s);
  lt = strlen(t);
  init();
  int le = 0, ri = ls / lt;
  while (le < ri) {
    long long cnt = 0;
    int mid = (le + ri) / 2 + 1;
    for (int i = 0; i < 26; i++) {
      if ((long long)mid * b[i] > (long long)a[i])
        cnt += (long long)mid * b[i] - (long long)a[i];
    }
    if (cnt > (long long)len)
      ri = mid - 1;
    else
      le = mid;
  }
  int p = 0;
  for (int i = 0; i < 26; i++) {
    if (a[i] >= le * b[i]) continue;
    for (int j = 0; j < le * b[i] - a[i]; j++) s[pos[p++]] = 'a' + i;
  }
  for (int i = p; i < len; i++) s[pos[i]] = 'a';
  printf("%s\n", s);
  return 0;
}
