"""
python3 a.py < input.txt
"""
import math
import itertools as it
import heapq
"""
N=int(input())
S=input()
K=int(input())

sk=S[K-1]
O=[]
for i in range(0,N):
    if S[i] == sk:
        O.append(S[i])
    else:
        O.append("*")

print("".join(O))
"""
N=int(input())
S=input()
lb=None
nb=0
nw=0
for i in range(N):
    if S[N-i-1] == "#":
        lb=N-i-1
        nb = nb+1
    if S[N-i-1] == ".":
        nw = nw+1

if lb != None:
    print(min(nb, nw))
else:
    print(0)
