# -*- coding: utf-8 -*-



n = int(eval(input()))

s = eval(input())

k = int(eval(input()))



t = s[k-1]



s_list = list(s)



for i in range(n):

    if s[i] != t:

        s_list[i] = '*'



s_changed = "".join(s_list)

print(s_changed)
# -*- coding: utf-8 -*-



n = int(eval(input()))

s = list(eval(input()))

k = int(eval(input()))



c = s[k-1]



for i in range(n):

    if s[i] != c:

        s[i] = '*'



ans = "".join(s)

print(ans)
# -*- coding: utf-8 -*-
n = int(eval(input()))
s = eval(input())
k = int(eval(input()))
t = s[k - 1]
s_list = list(s)
for i in range(n):
    if s[i] != t:
        s_list[i] = "*"
s_changed = "".join(s_list)
print(s_changed)

# -*- coding: utf-8 -*-
n = int(eval(input()))
s = list(eval(input()))
k = int(eval(input()))
c = s[k - 1]
for i in range(n):
    if s[i] != c:
        s[i] = "*"
ans = "".join(s)
print(ans)

-s = eval(input()) +s = list(eval(input())) -t = s[k - 1] -s_list = list(s) +c = s[k - 1] -    if s[i] != t: -        s_list[i] = "*" -s_changed = "".join(s_list) -print(s_changed) +    if s[i] != c: +        s[i] = "*" +ans = "".join(s) +print(ans)