n = int(input())

S = input()

k = int(input())



for s in S:

    print(s if s == S[k-1] else '*', end="")

n = int(input())

S = input()

k = S[int(input())-1]

print(*[s if s==k else '*' for s in S], sep='')

n = int(input())
S = input()
k = int(input())
for s in S:
    print(s if s == S[k - 1] else "*", end="")

n = int(input())
S = input()
k = S[int(input()) - 1]
print(*[s if s == k else "*" for s in S], sep="")

-k = int(input()) -for s in S: -    print(s if s == S[k - 1] else "*", end="") +k = S[int(input()) - 1] +print(*[s if s == k else "*" for s in S], sep="")