#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  string a;
  cin >> a;
  string b;
  cin >> b;
  long long question_mark = 0;
  vector<long long> q;
  vector<long long>::iterator it;
  long long has[26] = {0};
  for (long long i = 0; i < a.size(); i++) {
    if (a[i] == '?') {
      q.push_back(i);
      question_mark++;
    } else {
      has[a[i] - 'a']++;
    }
  }
  it = q.begin();
  long long start = -1;
  while (question_mark > 0) {
    start = start + 1;
    if (start == b.size()) {
      start = 0;
    }
    if (has[b[start] - 'a'] > 0) {
      has[b[start] - 'a']--;
    } else {
      a[*it] = b[start];
      question_mark--;
      it++;
    }
  }
  cout << a;
  return 0;
}
