#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 233;
char s[maxn], t[maxn];
int a[30], b[30];
bool check(int x) {
  long long tot = 0;
  for (int i = 1; i <= 26; i++) tot += max(0LL, 1LL * b[i] * x - a[i]);
  if (tot > a[0]) return 0;
  return 1;
}
int main() {
  scanf("%s", s);
  int n = strlen(s);
  for (int i = 0; i < n; i++) {
    if (s[i] == '?')
      a[0]++;
    else
      a[s[i] - 'a' + 1]++;
  }
  scanf("%s", t);
  int m = strlen(t);
  for (int i = 0; i < m; i++) {
    b[t[i] - 'a' + 1]++;
  }
  int l = 0, r = 1000000;
  while (l != r) {
    int mid = (l + r) >> 1;
    mid++;
    if (check(mid))
      l = mid;
    else
      r = mid - 1;
  }
  for (int i = 1; i <= 26; i++) b[i] = l * b[i];
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') {
      s[i] = 'a';
      for (int j = 1; j <= 26; j++)
        if (a[j] < b[j]) {
          a[j]++;
          s[i] = 'a' + j - 1;
          break;
        }
    }
    putchar(s[i]);
  }
  return 0;
}
