using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string t = Console.ReadLine();
            string s = Console.ReadLine();
            string t1 = "";
            int br = 0;
            if (s.Length < 2)
            {
                t1 = t.Replace(s, "*");
            }
            else
            {
                t1 = t.Replace(s, (s.Substring(0, s.Length - 1) + "*"));
            }
            Console.WriteLine(t1);
            Console.ReadLine();
        }
    }
}