#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926535897932385;
const long double E = 2.71828182845904523536;
const double eps = 1e-9;
const long long mod = 1e9 + 7;
const long long inf = 1 << 30;
const int N = 1000010;
char s[N], t[N];
long long frq1[555], frq2[555];
bool vis[555];
vector<pair<long long, long long> > v;
vector<char> ans;
long long cnt;
bool ok(long long x) {
  long long cnt1 = 0;
  for (auto y : v) cnt1 += max(0LL, (y.second * x) - y.first);
  return cnt1 <= cnt;
}
int main() {
  scanf("%s%s", &s, &t);
  int n1 = strlen(s), n2 = strlen(t);
  for (int i = 0; i < n1; i++) {
    frq1[s[i]]++;
    if (s[i] == '?') cnt++;
  }
  for (int i = 0; i < n2; i++) frq2[t[i]]++;
  for (int i = 0; i < n2; i++) {
    if (!vis[t[i]]) {
      vis[t[i]] = 1;
      v.push_back({frq1[t[i]], frq2[t[i]]});
    }
  }
  int lo = 0, hi = 1e6 + 6;
  while (hi > lo) {
    int mid = (lo + hi + 1) >> 1;
    if (ok(mid))
      lo = mid;
    else
      hi = mid - 1;
  }
  for (int i = (int)'a'; i <= (int)'z'; i++) {
    int z = (frq2[i] * lo) - frq1[i];
    while (z > 0) {
      ans.push_back(i);
      z--;
    }
  }
  for (int i = 0; i < n1; i++) {
    if (s[i] == '?') {
      if (ans.size()) {
        s[i] = ans.back();
        ans.pop_back();
      } else
        s[i] = 'a';
    }
  }
  printf("%s", s);
  return 0;
}
