#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e16;
const int MX = 100015;
string s, t;
int kmp[1000005];
int T[1005];
vector<char> v;
int main() {
  cin >> s >> t;
  int p1 = 0, p2 = 1;
  while (p2 < t.size()) {
    if (t[p1] == t[p2]) {
      kmp[p2] = p1 + 1;
      p1++;
      p2++;
      continue;
    } else {
      p2++;
      p1 = kmp[p2 - 1];
    }
  }
  int ind = 0, sum = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '?')
      sum++;
    else
      T[s[i]]++;
  }
  while (1) {
    if (ind == t.size()) ind = 0;
    if (T[t[ind]]) {
      T[t[ind]]--;
      ind++;
      continue;
    }
    if (sum == 0) break;
    sum--;
    v.push_back(t[ind]);
    ind++;
  }
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '?') {
      cout << v.back();
      v.pop_back();
    } else
      cout << s[i];
  }
}
