#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
char s[N], t[N];
int main() {
  scanf(" %s", s);
  scanf(" %s", t);
  int n = strlen(s);
  int n2 = strlen(t);
  int low = 1, high = n / n2, res = 0;
  while (high >= low) {
    int mid = (low + high) / 2;
    int frq[26] = {0}, q = 0;
    for (int i = 0; i < n; i++)
      if (s[i] == '?')
        q++;
      else
        frq[s[i] - 'a']++;
    for (int i = 0; i < n2; i++) frq[t[i] - 'a'] -= mid;
    for (int i = 0; i < 26; i++)
      if (frq[i] < 0) q += frq[i];
    if (q >= 0) {
      res = mid;
      low = mid + 1;
    } else
      high = mid - 1;
  }
  int frq[26] = {0}, j = 0;
  for (int i = 0; i < n; i++)
    if (s[i] != '?') frq[s[i] - 'a']++;
  for (int i = 0; i < n2; i++) frq[t[i] - 'a'] -= res;
  for (int i = 0; i < 26; i++) {
    while (frq[i] < 0) {
      while (s[j] != '?') j++;
      s[j] = i + 'a';
      j++;
      frq[i]++;
    }
  }
  while (j < n) {
    if (s[j] == '?') s[j] = 'a';
    j++;
  }
  printf("%s\n", s);
  return 0;
}
