import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.stdio;

void main() {
    auto S = readln.chomp;
    auto T = readln.chomp;

    long hatena = 0;
    foreach (s; S) if (s == '?') hatena += 1;
    auto cnt2 = new long[](26);
    foreach (s; S) if (s != '?') cnt2[s - 'a'] += 1;

    auto cnt = new long[](26);
    foreach (t; T) cnt[t - 'a'] += 1;

    long hi = 10^^7;
    long lo = 0;
    auto hoge = new long[](26);
    long h;

    while (hi - lo > 1) {
        long mid = (hi + lo) / 2;
        foreach (i; 0..26) hoge[i] = cnt[i] * mid - cnt2[i];
        h = hatena;
        foreach (i; 0..26) h -= max(0, hoge[i]);
        if (h >= 0) lo = mid;
        else hi = mid;
    }

    foreach (i; 0..26) cnt[i] = cnt[i] * lo - cnt2[i];
    int p = 0;
    while (p < 26 && cnt[p] <= 0) p += 1;
    auto ans = new char[](S.length);

    foreach (i; 0..S.length) {
        if (S[i] == '?' && p < 26) {
            ans[i] = (p.to!char + 'a').to!char;
            cnt[p] -= 1;
            while (p < 26 && cnt[p] <= 0) p += 1;
        } else if (S[i] == '?' && p >= 26){
            ans[i] = 'z';
        } else {
            ans[i] = S[i];
        }
    }

    ans.writeln;
}
