#include <bits/stdc++.h>
using namespace std;
const int M = 1e6 + 10;
char s[M], t[M];
int a[26], b[26];
int main() {
  scanf("%s%s", s, t);
  int cnt = 0;
  for (int i = 0; s[i]; i++) {
    if (s[i] == '?')
      cnt++;
    else
      a[s[i] - 'a']++;
  }
  for (int i = 0; t[i]; i++) {
    b[t[i] - 'a']++;
  }
  int su = 1;
  int n = strlen(s);
  int now = 0;
  while (cnt) {
    while (s[now] != '?') now++;
    int flag = true;
    for (int i = 0; i < 26; i++) {
      int d = su * b[i] - a[i];
      if (d <= 0) continue;
      if (cnt < d) {
        flag = false;
        break;
      }
      a[i] += d;
      cnt -= d;
      while (d) {
        s[now] = i + 'a';
        while (s[now] != '?') now++;
        d--;
      }
    }
    if (!flag) break;
    su++;
  }
  while (cnt) {
    while (s[now] != '?') now++;
    s[now] = 'a';
    cnt--;
  }
  puts(s);
}
