Problem:
 Score : 200 points    Problem Statement 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 * .      Constraints  1 \leq K \leq N\leq 10  S is a string of length N consisting of lowercase English letters.  N and K are integers.         Input Input is given from Standard Input in the following format:  N  S  K       Output Print the string obtained by replacing every character in S that differs from the K -th character of S , with * .        Sample Input 1 5
error
2      Sample Output 1 *rr*r  The second character of S is r . When we replace every character in error that differs from r with * , we get the string *rr*r .       Sample Input 2 6
eleven
5      Sample Output 2 e*e*e*       Sample Input 3 9
education
7      Sample Output 3 ******i**

Solution (Python):
n = int(input())
s = input()
k = int(input())

ans_list = []
t = s[k-1]
for i in s:
  if i == t:
    ans_list.append(t)
  else:
    ans_list.append("*")
print("".join(ans_list))

Solution (Python):
n=int(input())
s=list(input())
t=int(input())

for i in range(n):
  if s[i]!=s[t-1]:
    s[i]='*'
print(*s,sep='')

Solution (Python):
N = input()
S = input()
K = int(input())

t = S[K-1]
for i in range(len(S)):
    print(S[i] if S[i]==t else '*', end='')

Solution (Python):
N = input()
S = input()
k = int(input())

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

Solution (Python):

n = int(input())
s = list(input())
k = int(input())
moji = s[k-1]

for i in range(n):
    if s[i] != moji:
        s[i] = "*"
print("".join(s))

Solution (Python):
input()
B = input()
k = int(input())
for v in B:
    print(v if B[k-1] == v else "*",end="")

Solution (Python):
n = int(input())
s = input()
k = int(input())

c = s[k-1]

for i in range(n):
  if s[i] != c:
    s = s.replace(s[i], '*')

print(s)

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

Solution (Python):
n = int(input())
s = input()
a = s[int(input()) - 1]
for i in range(n):
    print(s[i] if s[i] == a else '*', end = '')

Solution (Python):
n=int(input())
s=input()
k=int(input())
for i in range(n):
  if s[k-1]!=s[i]:
    s = s.replace(s[i],"*")
print(s)

Solution (Python):
N = int(input())
S = str(input())
K = int(input())
ans = ""
for i in range(0, N):
    if(S[i] != S[K-1]):
        ans += "*"
    else:
        ans += S[K-1]
print(ans)

Solution (Python):
n = int(input())
s = input()
k = int(input())
ss = ''
for i in range(n):
	if s[i] == s[k-1]:
		ss += s[i]
	else:
		ss += '*'
print(ss)

Solution (Python):
input()
S=input()
k=int(input())
l=S[k-1]
ans=''
for s in S:
    if s==l:
        ans+=s
    else:
        ans+='*'
print(ans)

Solution (Python):
n=int(input())
s=input()
k=int(input())
d=""
for i in range(n):
	if s[i]==s[k-1]:
		d+=s[i]
	else:
		d+="*"
print(d)

Solution (Python):
N = int(input())
S = input()
K = int(input())
for s in S:
  if s == "*":
    continue
  if S[K-1] != s:
    S = S.replace(s, "*")
print(S)

Solution (Python):
n = int(input())
s = list(input())
k = int(input())
st = s[k-1]
for i in range(n):
    if s[i] != st:
        s[i] = "*"
for i in range(len(s)):
    print(s[i], end="")
print()

Solution (Python):
n = int(input())
s = list(input())
k = int(input())
st = s[k-1]
for i in range(n):
    if s[i] != st:
        s[i] = "*"
for i in range(len(s)):
    print(s[i], end="")
print()

Solution (Python):
n = int(input())
s = list(input())
k = int(input())
st = s[k-1]
for i in range(n):
    if s[i] != st:
        s[i] = "*"
for i in range(len(s)):
    print(s[i], end="")
print()

Solution (Python):
n= int(input())
s = input()
k = int(input())

ans = ""
for i in range(n):
    if s[i] == s[k-1]:
        ans += s[i]
    else:
        ans += "*"
print(ans)

Solution (Python):
N = int(input())
S = str(input())
K = int(input())

ans = ""

for c in S:
 if c == S[K-1]:
  ans += c;
 else:
  ans += "*"
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline()[:-1]
from bisect import *
from collections import *
from heapq import *
from fractions import Fraction

n = int(input())
S = input()
x = S[int(input())-1]
ans = ''
for c in S:
    if c != x:
        ans += '*'
    else:
        ans += x
print(ans)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007


def A():
    a,b,c = LI()
    if min(a,b) < c < max(a,b):
        print("Yes")
    else:
        print("No")
    return


def B():
    n = I()
    s = S()
    k = I()
    f = s[k-1]
    for i in range(n):
        if s[i] != f:
            print("*",end = "")
        else:
            print(s[i],end = "")
    print()
    return


def C():

    return


def D():

    return


def E():

    return


def F():

    return


def G():

    return


if __name__ == "__main__":
    B()

Solution (Python):
N = int(input())
S = input()
K = int(input())

ch = S[K-1]

x = [ch if ch == s else "*" for s in S]
print("".join(x))

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

Solution (Python):
n=int(input())
s=input()
char_list=list(s)
k=int(input())
for i in range(n):
	if(char_list[k-1]!=char_list[i]):
  		char_list[i] = "*"
str = ''.join(char_list)
print(str)

Solution (Python):
N=int(input())
S=list(input())
K=int(input())
for i in range(N):
  if S[i]!=S[K-1]:
    S[i]="*"
print("".join(S))

Solution (Python):
N = int(input())
S = list(input())
K = int(input())

for i in range(N):
    if S[i] != S[K-1]:
        S[i] = "*"

print("".join(S))

Solution (Python):
n = int(input())
s = input()
r = int(input())
a = s[r-1]
ans = ''
for i in range(n):
  if s[i] == a:
    ans += s[i]
  else:
    ans += "*"
print(ans)

Solution (Python):
N = int(input())
S = input()
K = int(input())

target = S[K - 1]
ans = ""
for s in S:
    if s != target:
        ans += "*"
    else:
        ans += target
print(ans)

Solution (Python):
import re
n = int(input())
s = input()
k = int(input())

res = re.sub('[^'+s[k-1]+']', '*', s)
print(res)

Solution (Python):
N = int(input())
S = input()
K = int(input())

O = []
for s in S:
    if s != S[K-1]:
        O.append("*")
    else:
        O.append(s)

print("".join(O))

Solution (Python):
N = int(input())
S = input()
K = int(input())

for c in S:
    if c == S[K - 1]:
        print(c, end="")
    else:
        print("*", end="")
print()

Solution (Python):
n = int(input())
s = str(input())
num = int(input())
key = s[num-1]
ans = ""
for i in range(n):
  if s[i] != key:
    ans += "*"
  else:
    ans += key
print(ans)

Solution (Python):
n=int(input())
l=list(str(input()))
k=int(input())
a=l[k-1]
ans=[]
for i in range(n):
    if l[i]==a:ans.append(a)
    else:ans.append("*")
print("".join(ans))

Solution (Python):
import re

N=int(input())
S=input()
K=int(input())

pat = re.compile(r'[^{0}]'.format(S[K-1]))

print(re.sub(pat,'*',S))

Solution (Python):
n = int(input())
s = input()
k = int(input())
ans = ""

for i in range(n):
    if s[k-1] != s[i]:
        ans += "*"
    else:
        ans += s[k-1]
        
print(ans)

Solution (Python):
def solve(n, s, k):
    return "".join([("*" if s[i] != s[k-1] else s[i]) for i in range(n)])

n = int(input())
s = input()
k = int(input())
print(solve(n, s, k))

Solution (Python):
N = int(input())
S = input()
K = int(input())
ans = ''
for i in range(0, N):
	if S[i] != S[K-1]:
		ans = ans + '*'
	else:
		ans = ans + S[i]
print(ans)

Solution (Python):
import re

N = int(input())
S = input().rstrip()
K = int(input())

r = S[K-1]
pattern = "[^%s]" % r
print(re.sub(pattern, '*', S))

Solution (Python):
n = int(input())
s = input()
k = int(input())

x = s[k-1]
temp_list = []

for c in s:
  if c is not x:
    temp_list.append('*')
  else:
    temp_list.append(c)

print(''.join(temp_list))

Solution (Python):
from functools import reduce

N = int(input())
S = input()
K = int(input()) - 1

print(reduce(lambda x, y: x + (y if y == S[K] else '*'), S, ''))

Solution (Python):
N = int(input())
S = input()
K = int(input())
ans = ''
for s in S:
    if s == S[K-1]: ans += s
    else: ans += '*'
print(ans)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()
    s = S()
    k = I()

    return re.sub(r'[^{}]'.format(s[k-1]), '*', s)


print(main())

Solution (Python):
n = int(input())
s = input()
k = int(input())
for a in range(n) :
    if s[a] != s[k-1] :
        s = s[:a]+"*"+s[a+1:]
print(s)

Solution (Python):
n=int(input())
s=input()
k=int(input())
for i in range(n):
  print('*' if s[i] != s[k-1] else s[i],end='')

Solution (Python):
n = int(input())
s = input()
k = int(input())

ans = [a  if a == s[k-1] else "*" for a in s]
print("".join(ans))

Solution (Python):
N = int(input())
S = input()
K = int(input())
c = S[K-1]

answer = ['*'] * N
for i in range(N):
  if S[i] == c:
    answer[i] = c

print(''.join(answer))

Solution (Python):
N = int(input())
S = str(input())
K = int(input())
Char = ''
for i in range(N):
	if S[i] != S[K-1]:
		Char += '*'
	else:
		Char += S[i]
print(Char)

Solution (Python):
n=int(input())
s=input()
k=int(input())
for i in s:
    if i!=s[k-1]:
        s=s.replace(i,'*')
print(s)

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b



def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2



def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)



def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def main():
    N = int(input())
    S = input()
    K = int(input())

    t = S[K - 1]
    ans = ""
    for c in S:
        if c != t:
            ans += "*"
        else:
            ans += c
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
S = str(input())
K = int(input())

target = S[K-1]
ans = ''
for i in range(N):
    if S[i] == target:
        ans += S[i]
    else:
        ans += '*'

print(ans)

Solution (Python):


N = int(input())
S = input().strip()
K = int(input())
newS = []
for elements in S:
    if S[K-1] != elements:
        elements = "*"
        newS.append(elements)
    else:
        newS.append(elements)
print("".join(newS))

Solution (Python):
n = int(input())
s = input()
k = int(input())
ans = ''
moji = s[k - 1]
for i in range(n):
    if s[i] == moji:
        ans += moji
    else:
        ans +='*'
print(ans)

Solution (Python):
a = int(input())
s = input()
k = int(input())

t = ["*"]*a
aa = s[k-1]
for f,i in enumerate(s):
  if i == aa:
    t[f] = i
print("".join(t))

Solution (Python):

a = int(input())
s = input()
k = int(input())

t = ["*"]*a
aa = s[k-1]
for f,i in enumerate(s):
  if i == aa:
    t[f] = i
print("".join(t))

Solution (Python):
N=int(input())
S=input()
K=int(input())
a=S[K-1]
for i in range(N):
    if a==S[i]:
        print(a,end='')
    else:
        print('*',end='')

Solution (Python):
n = int(input())
s = input()
k = int(input())
c = s[k-1]
for i in range(n):
    print(c if c == s[i] else "*", end="")
print("")

Solution (Python):

def main():
    N = int(input())
    S = input()
    K = int(input())

    S = [S[i] if S[i] == S[K-1] else "*" for i in range(N)]
    print(''.join(S))


if __name__ == "__main__":
    main()

Solution (Python):
N=int(input())
S=list(input())
K=int(input())
for i in range(N):
    if S[i]!=S[K-1]:
        S[i]="*"
print("".join(S))

Solution (Python):
N = int(input())
Ss = input()
K = int(input())

anss = []
for S in Ss:
    anss += ['*' if S != Ss[K-1] else S]

print(''.join(anss))

Solution (Python):
n=int(input())
s=input()
k=int(input())
for i in s:
    if i!=s[k-1]:
        s=s.replace(i,'*')
print(s)

Solution (Python):
n = int(input())
s = input()
k = int(input())
t = ""
for i in range(n) :
  if i != k - 1 and s[i] != s[k-1] :
    t = t + '*'
  else :
    t = t + s[i]
print(t)

Solution (Python):
import re
N = int(input())
S = input()
K = int(input())
print(re.sub('[^{' + S[K - 1] + ']', '*', S))

Solution (Python):
N=int(input())
S=list(input())
K=int(input())

s=S[K-1]

for i in range(N):
    if S[i] != s:
        S[i] = "*"
print("".join(S))

Solution (Python):
n=int(input())
s=list(input())
k=int(input())
l=s[k-1]
for i in range(n):
  if s[i]!=l:
    s[i]="*"
print("".join(s))

Solution (Python):
n = int(input())
s = input()
k = int(input())
for i in s:
	print('*' if i != s[k - 1] else i,end='')
print()

Solution (Python):
n = int(input())
s = str(input())
k = int(input())
z = s[k - 1]
y = ''
for i in range(n):
  if s[i] != z:
    y += '*'
  else:
    y += s[i]
print(y)

Solution (Python):



def main():
    n = int(input())
    s = input()
    k = int(input())
    ans = ''
    kth_s = s[k - 1]

    for si in s:
        if si != kth_s:
            ans += '*'
        else:
            ans += si

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):

"""
B - *e**** ********e* *e****e* ****e**
https://atcoder.jp/contests/tenka1-2019-beginner/tasks/tenka1_2019_b

"""
import sys


def solve(N, S, K):
    ch = S[K-1]
    ans = [['*', s][ch==s] for s in S]
    return ''.join(ans)


def main(args):
    N = int(input())
    S = input()
    K = int(input())
    ans = solve(N, S, K)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
from sys import stdin


def main():
    _ = int(stdin.readline().rstrip())
    S = stdin.readline().rstrip()
    K = int(stdin.readline().rstrip())
    print(''.join([c if c == S[K - 1] else '*' for c in S]))


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
S = input()
K = int(input())

C = S[K-1]

ans = ""

for i in range(N):
    if S[i] == C:
        ans += C
    else:
        ans += "*"
print(ans)

Solution (Python):
N = int(input())
S = list(input())
K = int(input())
x = S[K - 1]
ans = ""
for i in range(N):
	if S[i] == x:
		ans += x
	else:
		ans += "*"

print(ans)

Solution (Python):
import re

n=int(input())
s=input()
k=int(input())

target=s[k-1]

s=s.replace(target, '0')
s=re.sub('[a-z]', "*", s)
s=s.replace('0', target)
print(s)

Solution (Python):
N = int(input())
S = list(input())
K = int(input())

check = S[K-1]

for i in range(N):
  if S[i] != check:
    S[i] = '*'
    
print(''.join(S))

Solution (Python):
n ,s ,k =  int(input()),input(), int(input())
b = s[k-1]
for i in range(len(s)):
	if s[i] != b:
		print('*',end= '')
	else:print(b, end = '')
print()

Solution (Python):
n = int(input())
s = input()
k = int(input())

slist = list(s)
char = slist[k-1]

print(''.join([c if c == char else '*' for c in slist]))

Solution (Python):
N = int(input())
S = list(input())
K = int(input())

target = S[K - 1]

result = ["*"] * N
for i in range(N):
    char = S[i]
    if char == target:
        result[i] = target
    else:
        result[i] = "*"
print("".join(result))

Solution (Python):
N = int(input())
S = input()
K = int(input())
for i in range(N):
  if S[i] != S[K-1]:
    S = S.replace(S[i],'*')
print(S)

Solution (Python):
input()
s=input()
k=s[int(input())-1]
print(''.join(['*'if c!=k else c for c in s]))

Solution (Python):
N = int(input())
S = input()
K = int(input())
for i in range(N):
  if S[i] != S[K-1]:
    S = S.replace(S[i],'*')
print(S)

Solution (Python):
N=int(input())
S=input()
K=int(input())

for i in range(N):
    if S[i]!=S[K-1]:
        S=S.replace(S[i],'*')
        continue

print(S)

Solution (Python):
import re

n = int(input())
s = input()
k = int(input())

p = '[^' + s[k-1] + ']'
print(re.sub(p, '*', s))

Solution (Python):
n = int(input())
s = list(input())
k = int(input())

s2 = [["*", i][i == s[k-1]] for i in s]
print(("").join(s2))

Solution (Python):
n = int(input())
s = list(input())
k = int(input())

s2 = ""
c = s[k-1]
for i in range(len(s)):
	if s[i] == c:
		s2 += c
	else:
		s2 += "*"
print(s2)

Solution (Python):
n = int(input())
s = input()
k = int(input())
tar = s[k-1]
print ("".join([ it if it==tar else "*" for it in s ]))

Solution (Python):
N = int(input())
S = str(input())
K = int(input())
targc = S[K-1]
print("".join([c if c==targc else "*" for c in S]))

Solution (Python):
N = int(input())
S = input()
K = int(input())

c = S[K - 1]
ans = ""
for s in S:
    if s == c:
        ans += s
    else:
        ans += "*"

print(ans)

Solution (Python):
n = int(input())
s = input()
k = int(input())

a = s[k - 1]
for i in s:
	if i != a:
		s = s.replace(i, '*')

print(s)

Solution (Python):
N = int(input())
S = input()
K = int(input())

target_string = S[K-1]

ans = S[:]
for i in S:
  if i != target_string:
    ans = ans.replace(i,"*")

print("{}".format(ans))

Solution (Python):


N = int(input())
S = input()
K = int(input())

base = S[K-1]
new = []

for i in range(N):
    if S[i] != base:
        new.append('*')
    else:
        new.append(base)

ans = ''.join(new)
print(ans)

Solution (Python):
N = int(input())
S = input()
K = int(input())
e = S[K-1]
ans = []
for c in S:
    if c != e:
        ans.append("*")
    else:
        ans.append(c)
print(*ans, sep='')

Solution (Python):
n = int(input())
s = input()
k = int(input())

w = s[k - 1]
print("".join(list(map(lambda x: "*" if x != w else x, s))))

Solution (Python):
n = int(input())
s = str(input())
k = int(input())

_s = s[k-1]
ans = ''
for i in range(n):
    if s[i] == _s:
        ans += _s
    else:
        ans += '*'

print(ans)

Solution (Python):
n=int(input())
s=input()
k=s[int(input())-1]
print("".join([t if t==k else "*" for t in s]))

Solution (Python):
n=int(input())
s=list(str(input()))
k=int(input())
a=[]
for i in range(n):
    if s[k-1]==s[i]:
        a.append(s[k-1])
    else:
        a.append("*")
b="".join(a)
print(b)

Solution (Python):
n = int(input())
s = list(input())
k = int(input())

moji = s[k-1]

for i in range(n):
	if s[i]!=moji:
		s[i]='*'

ans = ''.join(s)
print(ans)

Solution (Python):
n = int(input())
s = input()
k = int(input())

s_k = s[k-1]
ans = ""
for i in range(len(s)):
    if s[i] != s_k:
        ans += "*"
    else:
        ans += s[i]
print(ans)

Solution (Python):
n=int(input())
s=list(input())
k=int(input())
for i in range(n):
  if s[i]!=s[k-1]:
    s[i]='*'
print(''.join(s))

Solution (Python):
N = int(input())
S = list(input())
K = int(input())

T = [c if c == S[K - 1] else '*' for c in S]
print(''.join(T))

Solution (Python):
n = int(input())
s = input()
k = int(input())
c = s[k-1]
s2 = ""
for m in range(n):
	if s[m] == c:
		s2 += c
	else:
		s2 += '*'
        
print(str(s2))

Solution (Python):
N = int(input())
S = list(input())
K = int(input())

selected_s = S[K-1]

for i in range(N):
  if S[i] is not selected_s:
    s = "*"
    S[i] = "*"
print("".join(S))

Solution (Python):
N=int(input())
S=input()
K=int(input())
C=S[K-1]
S_=''
for c in S:
  if c == C:
    S_+=c
  else:
    S_+="*"
print(S_)

Solution (Python):
n = int(input())
s = list(input())
k = int(input())

for i in range(n):
    if s[i] != s[k-1]:
        s[i] = '*'
    else:
        pass

ans = ''.join(s)
print(ans)

Solution (Python):
n=int(input())
s=input()
k=int(input())

for i in range(len(s)):
    if s[i]!=s[k-1]:
        s=s.replace(s[i],'*')

print(s)

Solution (Python):


N = int(input())
S = input()
K =  int(input())

moji = S[K-1]

result = ''
for s in S:
    if s == moji:
        result+=s
    else:
        result+='*'
print(result)

Solution (Python):
N = int(input())
S = input()
K = int(input())

compare_str = S[K - 1]
result_str = ''
for s in list(S):
  if compare_str == s:
    result_str += s
  else:
    result_str += '*'
print(result_str)

Solution (Python):
n=int(input())
s=input()
k=int(input())
s0 = s[k-1]
ans = ''
i = 0
while i < len(s):
    if s[i] != s0:
        ans += '*'
    else:
        ans += s[i]
    i += 1
print(ans)

Solution (Python):
N = input()
S = input()
K = int(input())

for i in S:
  if i != S[K-1]:
    S = S.replace(i,"*")
print(S)

Solution (Python):
N = int(input())
S = list(str(input()))
K = int(input())

for i in range(0, N):
    if S[i] == S[K-1]:
        pass
    else:
        S[i] = '*'
print(''.join(map(str, S)))

Solution (Python):
n = int(input())
s = input()
k = int(input())

key = s[k-1]
result =""

for letter in s:
    if letter == key:
        result = result + key
    else:
        result =result +  "*"

print(result)

Solution (Python):
N=int(input())
S=list(input())
K=int(input())
count=0
x=len(S)
for i in range(0,x):
    if(S[i]!=S[K-1]):
        count=count+1
        S[i]="*"
print("".join(S))

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

Solution (Python):
n, s, k = [input() for _ in range(3)]
n, k = int(n), int(k) - 1
t = s[k]
print(''.join([c if c == t else '*' for c in s]))

Solution (Python):
n = int(input())
s = input()
k = int(input())

sl = list(s)
sk = sl[k-1]
for i in range(n):
  if sl[i] != sk:
    sl[i] = "*"

print("".join(sl))

Solution (Python):
N = int(input())
K = str(input())
S = int(input())
ans = ''
kw = K[S-1]
for i in K:
    if i != kw:
        i = '*'
    else:
        pass
    ans += i
print(ans)

Solution (Python):
N = int(input())
S = input()
K = int(input())

n = S[K-1]
ans = ""
for i in range(N):
  if S[i] != n:
    ans += "*"
  else:
    ans += S[i]
print(ans)

Solution (Python):
N=int(input())
S=input()
K=int(input())
s=S[K-1]
for i in range(0,N):
  if S[i]!=s:
    S=S.replace(S[i],'*')
    
    
print(S)

Solution (Python):
n=int(input())
s=input()
k=int(input())
num = 0
for i in s:
  if i == s[k-1]:
    num +=1
  else:
    s = s.replace(s[num],'*')
    num +=1
print(s)

Solution (Python):
in_data = [input() for i in range(3)] 
 
n = int(in_data[0])
s = in_data[1]
k = int(in_data[2])





target_c = s[k - 1]
new_s = ''
for c in s:
    if c == target_c:
        new_s += c
    else:
        new_s += '*'
 
print(new_s)

Solution (Python):
n = int(input())
s = input()
k = int(input())
ch = s[k-1]
for i in range(n):
    if s[i] != ch and s[i] != "*":
        s = s.replace(s[i], "*")
print(s)

Solution (Python):
import re

input()
S = input()
K = int(input())

print(re.sub(r'[^%s]' %S[K - 1] , '*', S))

Solution (Python):
import math
import sys
n = int(input())
s = input()
k = int(input())
x = ""
for i in s:
    if i == s[k-1]:
        x += s[k-1]
    else:
        x += "*"
print(x)

Solution (Python):


n = int(input())
s = list(input())
k = int(input())

c = s[k-1]

for i in range(n):
    if s[i] != c:
        s[i] = '*'

ans = "".join(s)
print(ans)

Solution (Python):
N = int(input().rstrip())
S = input().rstrip()
K = int(input().rstrip())
for i in S:
  print(i if i == S[K-1] else '*', end="")
print()

Solution (Python):
n = int(input())
s = str(input())
k = int(input())-1

c = s[k]

out = ""

for i in s:
    if i == c:
        out += i
    else:
        out += "*"

print(out)

Solution (Python):
n = int(input())
list =list(input())
m = ""
j = int(input()) - 1
for i in range(n):
  if list[i] == list[j]:
    m += list[j]
  else:
    m += "*"
print(m)

Solution (Python):
N = int(input())
S = list(input())
K = int(input())
for i in range(N):
  if S[i] != S[K-1]:
    S[i] = "*"
print("".join(S))

Solution (Python):
n = int(input())
s = input()
k = int(input())
change = s[k - 1]
for i in range(n):
    if s[i] != change:
        print("*", end="")
    else:
        print(s[i], end="")
    if i == n - 1:
        print()

Solution (Python):
user_input=[]
for i in range(3):
    user_input.append(input())
N=int(user_input[0])
S=user_input[1]
K=int(user_input[2])-1

S_list=[]
for i in S:
    S_list.append(i)

obj=S_list[K]
for i in range(N):
    if S_list[i] != obj:
        S_list[i]='*'
S_after=''.join(S_list)
print(S_after)

Solution (Python):
n = int(input())
s = list(input())
k = int(input())
 
 
for i in range(0,n):
  if s[i] != s[k-1]:
    s[i] = '*'

s = "".join(s)
print(s)

Solution (Python):
N = int(input())
S = input()
K = int(input())

a = S[K-1]

output = ""
for i in range(N):
    if S[i] == a:
        output += a
    else:
        output += "*"

print(output)

Solution (Python):
N = int(input())
S = input()
K = int(input())

tar = S[K-1]
_ = ""
for i in range(N):
    if S[i] == tar:
        _ += tar
    else:
        _ += "*"

print(_)

Solution (Python):
N = int(input())
S = input()
K = int(input())
for i in range(N):
	if S[i] != S[K - 1]:
		S = S[:i] + '*' + S[i + 1:]
print(S)

Solution (Python):
n = int(input())
s = input()
k = int(input())

x = s[k-1]
for i in range(n):
  if s[i] == x:
    print(x, end='')
  else:
    print('*', end='')

Solution (Python):
import re
input()
s = input()
k = s[int(input()) -1]

print(re.sub(r'[^%s]'%k, '*', s))

Solution (Python):
N=int(input())
S=list(input())
K=int(input())
moji=S[K-1]


for i in range(N):
    
    if S[i]!=moji:
        S[i]="*"
mojiretu=""
for x in S:
  mojiretu+=x
print(mojiretu)

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime,random
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

N = int(input())
S = list(input())
K = int(input())

for i,s in enumerate(S):
    if s != S[K-1]:
        S[i] = '*'

print (''.join(S))

Solution (Python):
n = int(input())
s = list(input())
k = int(input())-1
l = s[k]
for i in range(n):
  s[i] = l*(s[i] == l) or "*"
print("".join(s))

Solution (Python):
N = int(input())
S = input()
K = int(input())

char = S[K-1]
res = ''.join([char if c == char else '*' for c in S])
print(res)

Solution (Python):
N = int(input())
S = input()
K = int(input())
result = ''
c = S[K - 1]

for s in S:
    
    if(s != c):
        result += '*'
    
    else:
        result += s

print(result)

Solution (Python):
N = input()
S = input()
K = input()
c = S[int(K)-1]
r = ''
for t in S:
  if t == c:
    r += c
  else:
    r += '*'

print(r)

Solution (Python):
N = int(input())
S = input()
K = int(input())

ans = ''
for c in S:
    ans += (c if c==S[K-1] else '*')
print(ans)

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

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

Solution (Python):
N = int(input())
S = input()
K = int(input())

_ = ""
for s in S:
  if s is not S[K-1]:
    _ = _ + "*"
  else:
    _ = _ + s
print("".join(_))

Solution (Python):
n = input()
s = input()
k = int(input())

target_char = s[k-1]

out = ""
for s_i in s:
	if s_i != target_char:
		out += "*"
	else:
		out += s_i

print(out)

Solution (Python):
N,S,K = [input() for x in [0,1,2]]

c = S[int(K)-1]

ans = ""

for char in S:
    if char == c:
        ans += c
    else:
        ans += '*'
print(ans)

Solution (Python):
n=int(input())
s=input()
S=list(s)
k=int(input())

for i in range(0,n):
    if S[i]==S[k-1]:
        continue
    else:
        S[i]='*'


print(''.join(S))

Solution (Python):
N = input()
S = input()
K = int(input())-1

ans = ''
for s in S:
    if s == S[K]:
        ans += s
    else:
        ans += '*'
print(ans)

Solution (Python):
N = int(input())
S = list(input())
K = int(input())
target = S[K-1]
for i in range(N):
  if S[i] != target:
    S[i] = '*'
print(''.join(S))

Solution (Python):
N = int(input())
S = input()
K =int(input())
Kchar = S[K-1]
res = []

for c in S:
    if c == Kchar:
       res.append(c)
    else:
        res.append("*")

print("".join(res))

Solution (Python):
import math
import sys
N = int(input())
s = input()
k = int(input())
t = s[k-1]
u = ""
for i in s:
    if i == t:
        u += i
    else :
        u += '*'
print(u)

Solution (Python):
n = int(input())
s = input()
k = int(input())
w = s[k-1]
ss = ""
for i in range(n):
    if(s[i] == w):
        ss += w
    else:
        ss += "*"
print(ss)

Solution (Python):
N = int(input())
S = input()
K = int(input())

for i in S:
    if i != S[K-1]:
        S = S.replace(i, '*')

print(S)

Solution (Python):
import re
l = int(input())
ss = input()
n = int(input())-1
s = ss[n]
print(re.sub('[^%s]' % s, '*', ss))

Solution (Python):
N = int(input())
S = [_ for _ in input()]
K = int(input())

ans = [_ if _ == S[K - 1] else "*" for _ in S]

print("".join(ans))

Solution (Python):
N = int(input())
S = list(input())
K = int(input())
un_replace_s = S[K-1]
out = "".join([s if s == un_replace_s else "*" for s in S])
print(out)

Solution (Python):
n=int(input())
s=input()
k=int(input())
for i in range(n):
  if s[i]!=s[k-1]:
    s=s.replace(s[i],'*')
print(s)

Solution (Python):
input()
chars = input()
tg_char = chars[int(input())-1]
print("".join(map(lambda x: "*" if x!=tg_char else x, chars)))

Solution (Python):
k = int( input())
s = list(str(input()))
n = int( input())
a = ""
  
for i in range(len(s)):
    if s[i] != s[n-1]:
        s[i] = "*"
    a+=(str(s[i]))
        
print(a)

Solution (Python):
n = input()
s = input()
k = int(input())
ans = ''
target = s[k-1]
for i in s:
    if i == target:
        ans += i
    else:
        ans += '*'
print(ans)

Solution (Python):
n = int(input())
s = list(input())
k = int(input())
o = ""
x = s[k-1]
for i in s:
    if i != x:
        i = "*"
        o += i
    else:
        o += i
print(o)

Solution (Python):
n = int(input())
s = input()
k = int(input())
a = s[k-1]
s_ = ""
for i in range(n):
    if s[i] != a:
        s_ += "*"
    else:
        s_ += a
print(s_)

Solution (Python):
n = int(input())
s = input()
k = int(input())

s_list = list(s)




for i in range(n):
    if(s[i] != s[k-1]):
        
        s_list[i] = '*'

answer = "".join(s_list)
print(answer)

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

Solution (Python):
n = int(input())
s = input()
k = int(input())

c = s[k-1]
rs = ""
for e in s:
    if e == c:
        rs = rs + e
    else:
        rs = rs + '*'
print(rs)