#include <bits/stdc++.h>
using namespace std;
const long long MAXA = 26 + 13;
long long salph[MAXA], talph[MAXA];
queue<long long> que;
set<pair<pair<long long, long long>, long long> > need;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s, t;
  cin >> s >> t;
  for (long long i = 0; i < (long long)s.size(); i++) {
    if (s[i] == '?') {
      que.push(i);
    } else {
      salph[s[i] - 'a']++;
    }
  }
  for (long long i = 0; i < (long long)t.size(); i++) {
    talph[t[i] - 'a']++;
  }
  for (long long i = 0; i < 26; i++) {
    if (talph[i] != 0) {
      need.insert(make_pair(
          make_pair(salph[i] / talph[i],
                    ((salph[i] / talph[i]) + 1) * talph[i] - salph[i]),
          i));
    }
  }
  while (que.size()) {
    long long p11 = (need.begin()->first).first,
              p12 = (need.begin()->first).second, p2 = need.begin()->second,
              toBe = p12;
    while (que.size() and toBe > 0) {
      s[que.front()] = (char)(p2 + 'a');
      que.pop();
      salph[p2]++;
      toBe--;
    }
    need.erase(need.begin());
    need.insert(make_pair(make_pair(p11 + 1, talph[p2]), p2));
  }
  cout << s << endl;
  return 0;
}
