#include <iostream>
#include <string>
using namespace std;

int main()
{
    string T;
    string S;
    cin >> T;
    cin >> S;
    int x[200000];
    int j = 0;
    for (int i = 0; i < S.length(); i++)
    {
        x[i] = 0;
        while (S[i] == T[j])
        {
            x[i]++;
            j++;
        }
    }
    int index;
    for (int i = 0; i < S.length(); i++)
    {
        int n = x[0];
        if (x[i] < n )
        {
            n = x[i];
            index = i;
        }
    }
    string t = "*";
    for (int i = 0; i < T.length(); i++)
    {
        if (T[i] == S[index])
        {
            T[i] = t[0];
        }
    }
    for (int i = 0; i < T.length(); i++)
    {
        cout << T[i];
    }
}