#include <bits/stdc++.h>
using namespace std;
map<char, int> freq;
string a, b;
vector<int> v;
int main() {
  cin >> a >> b;
  for (int i = 0; a[i]; ++i) {
    if (a[i] == '?')
      v.push_back(i);
    else
      freq[a[i]]++;
  }
  int i = 0;
  while (i < v.size()) {
    for (auto j : b) {
      if (freq[j] > 0) {
        freq[j]--;
      } else {
        a[v[i]] = j;
        i++;
        if (i == v.size()) break;
      }
    }
  }
  cout << a << endl;
}
