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):
import sys



def input():
    return sys.stdin.readline().rstrip()

def main():

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

    d = S[K-1]

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

    print(*S,sep="")



if __name__ == "__main__":
    main()

Solution (Python):
import sys



def input():
    return sys.stdin.readline().rstrip()

def main():

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

    d = S[K-1]

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

    print(*S,sep="")



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())
s=input()
k=int(input())

c=s[k-1]

ans=""
for i in s:
  if i!=c:
    ans+="*"
  else:
    ans+=i
print(ans)

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil,pi,factorial
    from operator import itemgetter
    def I(): return int(input())
    def MI(): return map(int, input().split())
    def LI(): return list(map(int, input().split()))
    def LI2(): return [int(input()) for i in range(n)]
    def MXI(): return [[LI()]for i in range(n)]
    def SI(): return input().rstrip()
    def printns(x): print('\n'.join(x))
    def printni(x): print('\n'.join(list(map(str,x))))
    inf = 10**17
    mod = 10**9 + 7

    n=I()
    s=SI()
    k=I()
    u=s[k-1]
    for i in range(n):
        if s[i]==u:
            print(s[i],end="")
        else:
            print("*",end="")
    








if __name__=="__main__":
    main()

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

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

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

print (ans)

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

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())

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

Solution (Python):
import math
from datetime import date

def main():

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

	ans = ""
	for c in s:
		if c == s[k]:
			ans += s[k]
		else:
			ans += "*"

	print(ans)

main()

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

Solution (Python):
N,S,K = (input() for T in range(0,3))
N,K = int(N),int(K)
D = ['*']*N
for TN in range(0,N):
    if S[TN]==S[K-1]:
        D[TN] = S[K-1]
print(''.join(D))

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

Solution (Python):


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


if __name__ == "__main__":
    main()

Solution (Python):
import re
n=input()
s=input()
k=int(input())
print(re.sub("A",s[k-1],re.sub("[a-z]","*",re.sub(s[k-1],"A",s))))

Solution (Python):
import re
n = int(input())
s = input()
k = int(input())
print(re.sub("A",s[k-1],re.sub("[a-z]","*",re.sub(s[k-1],"A",s))))

Solution (Python):
import re
n = int(input())
s = input()
k = int(input())
print(re.sub("A",s[k-1],re.sub("[a-z]","*",re.sub(s[k-1],"A",s))))

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

Solution (Python):
a = int(input())
b = list(input())
c = int(input()) - 1
ch = b[c]
for i in range(len(b)):
	if(b[i] != ch):
		b[i] = "*"
print(''.join(b))

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

Solution (Python):

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

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

Solution (Python):
n=int(input())
s=input()
k=int(input())
ans=[]
for i in range(n):
    if s[i]==s[k-1]:
        t=s[i]
    else:
        t="*"
    ans.append(t)
print(*ans,sep="")

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

Solution (Python):
b = int(input())
a = list(input())
n = int(input())

control = a[n - 1]

for i in range(0, b):
    if a[i] != control:
        a[i] = "*"
    print(a[i], end = "")

Solution (Python):
from sys import exit
import math
import collections
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

n = ii()
s = input()
k = ii()

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

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

for i in range(N):
  if S[i] == S[K-1]:
    continue
  else:
    S[i] = '*'
    
print(''.join(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):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    letter = S[K - 1]

    res = ""
    for x in S:
        if x == letter:
            res += letter
        else:
            res += "*"

    print(res)


if __name__ == '__main__':
    main()

Solution (Python):

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

s_k = S[K - 1]

replaced = ''
for s in S:
    replaced = replaced + '*' if s != s_k else replaced + s_k

print(replaced)

Solution (Python):
def main():
    n = int(input())
    s = input()
    k = int(input())
    ans = ""
    sk = s[k - 1]

    for ch in s:
        if ch == sk:
            ans += sk
        else:
            ans += "*"

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
n = int(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()
k = int(input())

c = s[k - 1]
ans = ''
for l in s:
    if l != c:
        ans += '*'
    else:
        ans += c
print(ans)

Solution (Python):
n = int(input())
s = input()
k = int(input())
a = s[k-1]
l = []
for i in range(n):
  if s[i]!=a:
    l.append("*")
  else:
    l.append(a)
print(*l,sep='')

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

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):
input()
s = input()
k = int(input())
k-=1
p = s[k]
r = ''
for i in s:
	if i!=p:
		r+='*'
	else:
		r+=p
print(r)

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

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

print(''.join(ans))

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

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

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

a = s[k-1]
for i in range(n):
    if s[i] != a:
        s[i] = "*"
print("".join(s))

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

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

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

sk = S[K-1]

ans = ''
for s in S:
    if s != sk:
        ans += '*'
    else:
        ans += s

print(ans)

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

sk = s[k-1]

ans = []

for si in s:
    if si == sk:
        ans.append(si)
    else:
        ans.append("*")
        
print(*ans,sep="")

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,s,i=input(),input(),int(input())-1
for S in s:
  if S!=s[i]:print("*",end='')
  else:print(s[i],end='')

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

Solution (Python):
'''
Created on 2020/08/20

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  N=int(pin())
  S=pin()[:-1]
  K=int(pin())
  t=S[K-1]
  for i in range(N):
    if t==S[i]:
      pout(t)
    else:
      pout("*")
  print()
  return 
main()

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n = I()
s = S()
k = I()
c = s[k-1]
ans = ''
for x in s:
    if x == c:
        ans += x
    else:
        ans += '*'
print(ans)

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

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
s = rr()
k = ri()
a = s[k-1]
ans = ''
for i in s:
    if i == a:
        ans += a
    else:
        ans += '*'
print(ans)

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

t = s[k-1]

ans =''
for i in s:
    if i == t:
        ans += t
    else:
        ans += '*'

print(ans)

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

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):
n=int(input())
s=input()
k=int(input())
for i in s:
    if i==s[k-1]:
        print(i,end='')
    else:
        print('*',end='')

Solution (Python):

n=int(input())
s=input()
k=int(input())-1
x=s[k]
ans=""
for c in s:
    if c==x:
        ans+=c
    else:
        ans+="*"
print(ans)

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

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

Solution (Python):
import re
n,s,k=[input()for _ in "nsk"]
print(re.sub(f"[^{s[int(k)-1]}]","*",s))

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

print(*ans, sep='')

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

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

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

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

print(ans)

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

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

c = S[k-1]
ans = str()
for s in S:
    if s == c:
        ans += s
    else:
        ans += "*"

print(ans)

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

Solution (Python):
N, S, K = open(0).read().split()
N = int(N)
K = int(K)
ck = S[K - 1]
ans = [c if c == ck else "*" for c in list(S)]
print("".join(ans))

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

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

print(ans)

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

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

print(*[i for i in a],sep='')

Solution (Python):
from os import replace


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

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

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

Solution (Python):
n = int(input())
s = input()
pivot = s[int(input())-1]

for c in s:
  print(c if c == pivot else '*', end='')
  
print()

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

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

print(ans)

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

x = s[k - 1]

for i in range(n):
    if s[i] == x:
        ans = ans + s[i]
    else:
        ans = ans + "*"

print(ans)

Solution (Python):
'''     ░░█ ▄▀█ █   █▀ █░█ █▀█ █▀▀ █▀▀   █▀█ ▄▀█ █▀▄▀█  
        █▄█ █▀█ █   ▄█ █▀█ █▀▄ ██▄ ██▄   █▀▄ █▀█ █░▀░█     '''







import math;   from collections import *
import sys;    from functools import reduce
import time;   from itertools import groupby



def input()         : return sys.stdin.readline()
def get_ints()      : return map(int, input().strip().split())
def get_list()      : return list(get_ints())
def get_string()    : return list(input().strip().split())
def printxsp(*args) : return print(*args, end="")
def printsp(*args)  : return print(*args, end=" ")


DIRECTIONS = [(+0, +1), (+0, -1), (+1, +0), (+1, -1)] 
NEIGHBOURS = [(-1, -1), (-1, +0), (-1, +1), (+0, -1),\
              (+1, +1), (+1, +0), (+1, -1), (+0, +1)]


CAPS_ALPHABETS = {chr(i+ord('A')) : i for i in range(26)}
SMOL_ALPHABETS = {chr(i+ord('a')) : i for i in range(26)}
INF = float('inf')




n = int(input())
s = input().strip('\n')
k = int(input())
target = s[k-1]

for i in s:
	if i != target:
		printxsp('*')
	else:
		printxsp(target)

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 = input()
K = int(input())

c = S[K-1]
ans = ''

for i in range(N):
    if S[i] != c:
        ans += '*'
    else:
        ans += c

print(ans)

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

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

ans = ""
for c in s:
  if c == s[n - 1:n]:
    ans += c
  else:
    ans += "*"
    
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):
import math
import sys
import collections
import bisect
readline = sys.stdin.readline


def main():
    [n, s, k] = [str(readline().rstrip()) for _ in range(3)]
    s = list(s)
    strS = ""
    target = s[int(k) - 1]
    for i in range(int(n)):
        if s[i] == target:
            strS += s[i]
        else:
            strS += "*"
    print(strS)


if __name__ == '__main__':
    main()

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

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

for i in range(n):
    if s[i] != s[k]:
        s[i] = "*"
        
print(*s,sep="")

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

Solution (Python):
import sys, math
from collections import deque
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    N = ii()
    S = input()
    K = ii()
    ans = ''.join([S[i] if S[i] == S[K-1] else '*' for i in range(N)])
    print(ans)


if __name__ == '__main__':
    main()

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

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

ans = re.sub(rf'[^{s[k-1]}]', '*', s)
print(ans)

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

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

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

Solution (Python):
def main():
    n = int(input())
    S = input()
    k = S[int(input()) - 1]
    ans = [s if s == k else '*' for s in S]
    print(''.join(ans))

if __name__ == '__main__':
    main()

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

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

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

S_kth = S[K-1]
for i in range(N):
    if S[i] != S_kth:
        S[i] ='*'
print(*S, sep='')

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

target = s[k - 1]
res = []
for alp in s:
    if alp == target:
        res.append(alp)
    else:
        res.append('*')

print(''.join(res))

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

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

v = s[k-1]

ary = []

for i in s:
  if i != v:
    ary.append('*')
  else:
    ary.append(v)
print (''.join(ary))

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

ans = ""
for i in S:
  if i == s:
    ans += s
  else:
    ans += "*"
print(ans)

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

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, s, k = [input() for i in range(3)]
target = s[int(k)-1]
s = list(s)
for i in range(int(n)):
  if s[i] != target:
    s[i] = '*'
print("".join(s))

Solution (Python):
import sys

input = sys.stdin.readline


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

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

    print(ans)


if __name__ == "__main__":
    main()

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

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

Solution (Python):
n = input()
s = input()
i = int(input())
 
l = list(s)
for j, c in enumerate(l):
  if c != s[i-1]:
    l[j] = '*'
    
l = ''.join(l)
 
print(l)

Solution (Python):
N = int(input())
S = str(input())
K = int(input())
s =[]
for i in range(len(S)):
    if S[i] ==S[K-1]:
        s.append(S[i])
    else:
        s.append('*')
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()
k = int(input())
p = s[k - 1]
ans = ''
for i in range(n):
  if s[i] != p:
    ans += '*'
  else:
    ans += p
print(ans)

Solution (Python):
import re
n = int(input())
s = input()
k = int(input())
s = re.sub('[^%s]' % s[k-1], '*', s)
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], "*")
  
print(S)

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

Solution (Python):
n = int(input())
rawa = input()
n1 = int(input())
a = ""
b = rawa[n1-1]
for i in range(n):
  if rawa[i] == b:
    a += b
  else:
    a += "*"
print(a)

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

Solution (Python):
n = int(input())
s = input()
k = int(input())
t = s[k-1]
l = []

for i in range(n):
    if s[i] == t:
        l.append(t)
    else:
        l.append('*')

print(''.join(l))

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

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

res = ''

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

Solution (Python):

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N=I()
    S=list(input())
    K=I()
    K-=1
    s=S[K]
    for i in range(N):
        if S[i]!=s:
            S[i]="*"
            
    print(''.join(map(str, S)))

main()

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

import re
print(re.sub('[^' + s[k] + ']', '*', s))

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

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

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

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="")

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N = I()
    S = SS()
    K = I()

    ans = []
    S_k = S[K-1]
    for i in S:
        if i == S_k:
            ans.append(i)
        else:
            ans.append('*')

    print(''.join(ans))

if __name__ == '__main__':
    resolve()

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N = I()
    S = SS()
    K = I()

    ans = ''
    S_k = S[K-1]
    for i in S:
        if i == S_k:
            ans += i
        else:
            ans += '*'

    print(ans)

if __name__ == '__main__':
    resolve()

Solution (Python):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

n=int(input())
s=list(input())
k=int(input())
a=s[k-1]
for i in range(n):
    if s[i]!=a:
        s[i]="*"
print(*s,sep="")

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

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

Solution (Python):
import math
import collections
import fractions
import itertools

def solve():
    n = int(input())
    s = list(input())
    k= int(input())
    tar = s[k-1]
    for i in range(n):
        if tar != s[i]:
            s[i] = "*"
    print("".join(s))
    return 0

if __name__ == "__main__":
    solve()

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

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

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

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

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

Solution (Python):


import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union































def main():
    Num = Union[int, float]
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def isp():   return input().split()
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    
    n = ii()
    s = input()
    k = ii()
    char = s[k-1]
    buf = []
    for i in range(n):
        if s[i] == char:
            buf.append(s[i])
        else:
            buf.append('*')
    print(''.join(buf))


if __name__ == "__main__":
    main()

Solution (Python):
n,s,k=open(0).read().split();k=int(k)-1;
print("".join([("*" if x!=s[k] else x) for x in s]))

Solution (Python):
N = int(input())
S = input()
K = int(input())
A = S[K-1]
for i in range(N):
  if S[i]!= A:
    S = S.replace(S[i], "*")
  else:
    pass
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]="*"
print("".join(s))

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

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

if __name__ == "__main__":
    solve()

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

Solution (Python):
N,S,K=open(0).read().split()
print("".join(["*" if i!=S[int(K)-1] else i for i in S ]))

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

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()
K = int(input())

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

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

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

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