#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
char a[maxn], b[maxn];
int ned[35], have[35];
int main() {
  scanf("%s%s", a, b);
  int lena = strlen(a), lenb = strlen(b);
  for (int i = 0; i < lenb; i++) ned[b[i] - 'a']++;
  int fuck = 0;
  for (int i = 0; i < lena; i++) {
    if (a[i] == '?')
      fuck++;
    else if (ned[a[i] - 'a'])
      have[a[i] - 'a']++;
  }
  int can = 1 << 30;
  for (int i = 0; i < 26; i++)
    if (ned[i]) can = min(can, have[i] / ned[i]);
  for (int i = 0; i < 26; i++)
    if (ned[i]) have[i] -= ned[i] * can;
  int now = 0;
  for (int i = 0; i < lena; i++)
    if (a[i] == '?') {
      while (true) {
        int flag = 0;
        if (!ned[now])
          now++;
        else {
          if (have[now] < ned[now]) {
            have[now]++;
            flag = 1;
            a[i] = now + 'a';
          }
          if (have[now] >= ned[now]) {
            have[now] -= ned[now];
            now++;
          }
        }
        if (now >= 26) now = 0;
        if (flag) break;
      }
    }
  printf("%s\n", a);
  return 0;
}
