#include <bits/stdc++.h>
using namespace std;
int a[30];
stack<char> dit;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int sum = 0, len = s1.size();
  for (int i = 0; i < len; i++) {
    if (s1[i] == '?')
      sum++;
    else
      a[int(s1[i] - 'a')]++;
  }
  len = s2.size();
  while (sum > 0)
    for (int i = 0; i < len && sum > 0; i++) {
      if (a[int(s2[i] - 'a')])
        a[int(s2[i] - 'a')]--;
      else {
        sum--;
        dit.push(s2[i]);
      }
    }
  len = s1.size();
  for (int i = 0; i < len; i++) {
    if (s1[i] == '?') {
      cout << dit.top();
      dit.pop();
    } else
      cout << s1[i];
  }
  return 0;
}
