import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

void calc(string s, int k) {
    auto cs = new char[s.length];
    for (int i = 0; i < s.length; i++) {
        cs[i] = s[i] != s[k - 1] ? '*' : s[i];
    }
    writeln(cs);
}

void main() {
    readint;
    string s = read!string;
    int k = readint;
    calc(s, k);
}
