#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s, t;
  cin >> s >> t;
  vector<int> scnt(26, 0), tcnt(26, 0);
  for (char &c : s)
    if (c != '?') scnt[c - 'a']++;
  for (char &c : t) tcnt[c - 'a']++;
  for (auto &c : s) {
    if (c == '?') {
      int mn = 1e9;
      char p = '?';
      for (char z = 'a'; z <= 'z'; z++) {
        if (!tcnt[z - 'a']) continue;
        if (scnt[z - 'a'] / tcnt[z - 'a'] < mn) {
          mn = (scnt[z - 'a'] / tcnt[z - 'a']);
          p = z;
        }
      }
      c = p;
      scnt[c - 'a']++;
    }
  }
  cout << s << '\n';
}
