#include <bits/stdc++.h>
using namespace std;
void read(bool out = 0) {}
int main() {
  string second;
  string t;
  cin >> second >> t;
  if (second.length() < t.length()) {
    for (int i = 0; i < second.length(); i++) {
      if (second[i] == '?') second[i] = 'a';
    }
    cout << second << "\n";
    return 0;
  }
  long long num = 0;
  vector<char> ans;
  for (int i = 0; i < second.length(); i++) {
    if (second[i] == '?') num++;
  }
  long long weight[300] = {};
  for (int i = 0; i < t.size(); i++) weight[t[i]]++;
  set<pair<long long, char> > st;
  long long count[300] = {};
  for (int i = 0; i < second.size(); i++) count[second[i]]++;
  for (char c = 'a'; c <= 'z'; c++)
    if (weight[c]) st.insert(make_pair(count[c] / weight[c], c));
  while (num--) {
    pair<long long, char> p = *(st.begin());
    st.erase(st.begin());
    ans.push_back(p.second);
    count[p.second]++;
    st.insert(make_pair(count[p.second] / weight[p.second], p.second));
  }
  long long ind = 0;
  for (int i = 0; i < second.length(); i++)
    if (second[i] == '?') second[i] = ans[ind++];
  cout << second << "\n";
}
