import re

N = int(eval(input()))

S = eval(input())

K = int(eval(input()))



w = S[K-1]

print((re.sub("[^#]", "*", S.replace(w, "#")).replace("#", w)))

eval(input())

s = list(eval(input()))

print(("".join(("*" if x != y else x for x in s[int(eval(input()))-1] for y in s ))))

import re

N = int(eval(input()))
S = eval(input())
K = int(eval(input()))
w = S[K - 1]
print((re.sub("[^#]", "*", S.replace(w, "#")).replace("#", w)))

eval(input())
s = list(eval(input()))
print(("".join(("*" if x != y else x for x in s[int(eval(input())) - 1] for y in s))))

-import re - -N = int(eval(input())) -S = eval(input()) -K = int(eval(input())) -w = S[K - 1] -print((re.sub("[^#]", "*", S.replace(w, "#")).replace("#", w))) +eval(input()) +s = list(eval(input())) +print(("".join(("*" if x != y else x for x in s[int(eval(input())) - 1] for y in s))))