N = int(eval(input()))

S = eval(input())

K = int(eval(input()))



k = S[K-1]



ans = ''

for i in S:

    if i != k:

        ans += '*'

    else:

        ans += i



print(ans)

N = int(eval(input()))

S = list(eval(input()))

K = int(eval(input()))-1



ans = ''

p = S[K]

for i in range(N):

    if p == S[i]:

        ans += S[i]

    else:

        ans += '*'



print(ans)

N = int(eval(input()))
S = eval(input())
K = int(eval(input()))
k = S[K - 1]
ans = ""
for i in S:
    if i != k:
        ans += "*"
    else:
        ans += i
print(ans)

N = int(eval(input()))
S = list(eval(input()))
K = int(eval(input())) - 1
ans = ""
p = S[K]
for i in range(N):
    if p == S[i]:
        ans += S[i]
    else:
        ans += "*"
print(ans)

-S = eval(input()) -K = int(eval(input())) -k = S[K - 1] +S = list(eval(input())) +K = int(eval(input())) - 1 -for i in S: -    if i != k: +p = S[K] +for i in range(N): +    if p == S[i]: +        ans += S[i] +    else: -    else: -        ans += i