#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s, t;
  map<char, int> cn;
  int x = 0;
  cin >> s >> t;
  int n = s.size();
  for (int i = 0; i < n; i++) {
    if (s[i] != '?') {
      cn[s[i]]++;
    } else
      x++;
  }
  int in = 0;
  vector<char> v;
  while (1) {
    if (x == 0) break;
    in = in % t.size();
    if (cn[t[in]]) {
      cn[t[in]]--;
      in++;
    } else {
      v.push_back(t[in]);
      in++;
      x--;
    }
  }
  in = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') {
      s[i] = v[in];
      in++;
    }
  }
  cout << s << endl;
  return 0;
}
