#include <bits/stdc++.h>
long long max(long long a, long long b) { return a > b ? a : b; }
long long min(long long a, long long b) { return a < b ? a : b; }
using namespace std;
const int maxn = 1e6 + 5;
char p[maxn], q[maxn];
char v[maxn];
int P[27], Q[27];
int main() {
  scanf("%s", p);
  scanf("%s", q);
  memset(P, 0, sizeof(P));
  memset(Q, 0, sizeof(Q));
  int l2 = strlen(q), l1 = strlen(p);
  int ans = 0;
  for (long long i = 0; i < l1; i++) {
    if (p[i] == '?')
      ans++;
    else
      P[p[i] - 'a']++;
  }
  int a = 0;
  while (ans > 0) {
    for (long long i = 0; i < l2; i++) {
      if (P[q[i] - 'a'] > 0)
        P[q[i] - 'a']--;
      else {
        v[a++] = q[i];
        ans--;
      }
      if (!ans) break;
    }
  }
  a = 0;
  for (long long i = 0; i < l1; i++) {
    if (p[i] == '?')
      cout << v[a++];
    else
      cout << p[i];
  }
  cout << endl;
  return 0;
}
