You are given a string S of length N consisting of lowercase English letters, and an integer K. Print the string obtained by replacing every character in S that differs from the K-th character of S, with `*`.
n = int(input())
s = input()
k = int(input()) -1
d = s[k]
w = []
for i in range(n-1):
    if s[i] != d:
        w.append('*')
    else:
        w.append(d)
print(*w, sep='')
n = int(input())
s = input()
k = int(input()) -1
d = s[k]
w = []
for i in range(n):
    if s[i] != d:
        w.append('*')
    else:
        w.append(d)
print(*w, sep='')