#include <bits/stdc++.h>
using namespace std;
char s[1000055], t[1000055];
int a[26], b[26];
int can;
int n;
inline bool trial(int x) {
  long long need = 0ll;
  for (int i = 0; i < 26; i++) {
    long long u = a[i];
    long long v = 1ll * b[i] * x;
    need += max(0ll, v - u);
  }
  return need <= 1ll * can;
}
void construct(int x) {
  vector<int> pos;
  for (int i = 0; i < n; i++)
    if (s[i] == '?') {
      pos.push_back(i);
    }
  for (int i = 0; i < 26; i++) {
    while (a[i] < b[i] * x) {
      a[i]++;
      s[pos.back()] = i + 'a';
      pos.pop_back();
    }
  }
  for (int i = 0; i < n; i++)
    if (s[i] == '?') {
      s[i] = 'a';
    }
}
int main() {
  scanf("%s", s);
  scanf("%s", t);
  n = strlen(s);
  int m = strlen(t);
  for (int i = 0; i < n; i++) {
    if (s[i] == '?')
      can++;
    else
      a[s[i] - 'a']++;
  }
  for (int i = 0; i < m; i++) {
    b[t[i] - 'a']++;
  }
  int lb = 0, ub = n + 1;
  while (ub - lb > 1) {
    int mid = (ub + lb) >> 1;
    if (trial(mid))
      lb = mid;
    else
      ub = mid;
  }
  construct(lb);
  puts(s);
  return 0;
}
