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 = ''
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())
t = ''
for s in S:
  if s != S[K - 1]:
    t += '*'
  else:
    t += s
print(t)

Solution (Python):

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

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

Solution (Python):

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

for i in S:
    if i is S[K-1]:
        letter +=i
    else:
        letter +="*"
print(letter)

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 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())
v=s[k-1]
ans=""
for i in range(n):
  if s[i]==v:
    ans+=v
  else:
    ans+="*"
print(ans)

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

Solution (Python):
N = int(input())
S = input()
K = int(input())
A = [""] * N

c = S[K-1]

for i in range(N):
  if S[i] == c:
    A[i] = c
  else:
    A[i] = "*"
    
print("".join(A))

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

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

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

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

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

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

Solution (Python):
n = int(input())
s = [i for i in input()]
k = int(input())
g = s[k-1]

for i in range(n):
	if s[i] != g:
		s[i] = "*"

print("".join(s))

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

ans = [i if i==t else "*" for i in S]
print("".join(ans))

Solution (Python):

 
import math
import itertools
import sys
import copy
 




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

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

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

print(''.join(k))

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

y = s[m-1]

for ss in s:
    print(ss if ss == y else '*',end='')

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

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

Solution (Python):
from sys import stdin
n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()
k = int(stdin.readline().rstrip())

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

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

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=list(input())
K=int(input())
t=s[K-1]
for i in range(N):
    if s[i]!=t:
        s[i]="*"
print("".join(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=list(input())
K=int(input())
w=S[K-1]
ans=""
for i in range(N):
    if S[i]==w:
        ans+=w
    else:
        ans+="*"
print(ans)

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

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

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

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

s = list(map(lambda x: '*' if x != s[k] else x, s))

print(*s, sep='')

Solution (Python):
from sys import stdin
import sys

def ria(sep = ''):
    if sep == '' :
        return list(map(int, input().split())) 
    else: return list(map(int, input().split(sep)))
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()

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


if __name__ == "__main__":
    main()

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

obj = s[k-1]

ans = ""

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

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

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(*s, sep="")

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

std=S[K-1]

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

print(*S, sep="")

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):
import re
int(input())
s=input()
print(re.sub('[^{}]'.format(s[int(input())-1]),"*",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):
N = int(input())
S = input()
K = int(input())

K -= 1

ans = ['*'] * N

for i in range(0, N):
	if S[i] == S[K]:
		ans[i] = S[K]

T = ''.join(ans)

print(T)

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

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

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

Solution (Python):
import re

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

ans = re.sub(r"[^{}]".format(S[K-1]), "*", S)
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.append(i)
    else:
        ans.append('*')
print(''.join(ans))

Solution (Python):
import math

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

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

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

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

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

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

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

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

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

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

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

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

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

print(''.join(S))

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

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

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

letter = word[k - 1]
replaced = ""

for w in word:
  if w == letter:
    replaced += letter
  else:
    replaced += "*"

print(replaced)

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

Solution (Python):


n = int(input())
s = input()
k = int(input())
ans = []

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

print(''.join(ans))

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

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

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

for i in range(N):
    if S[i] != substitute:
        S[i] = '*'

print(''.join(S))

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

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

char = S[K-1]

O = []
for i in range(N):
  if S[i] != char:
    O.append('*')
  else:
    O.append(char)
print(''.join(O))

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

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

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n = int(readline())
    s = str(readline().rstrip().decode('utf-8'))
    k = int(readline())
    r = s[k-1]
    ans = []
    for i in range(n):
        if s[i] != r:
            ans.append("*")
        else:
            ans.append(r)
    print("".join(ans))


if __name__ == '__main__':
    solve()

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

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

Solution (Python):
N=int(input())
S=input()
K=int(input())
c0=S[K-1]
ans=''
for c in S:
    if c==c0:
        ans+=c0
    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):
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())
for n in range(N):
    if S[n] != S[K-1]:
        S[n] = '*'
print(*S,sep='')

Solution (Python):

import sys

def main():
    n, s, k = sys.stdin.read().split()
    n, k = map(int, [n, k])

    c = s[k-1]
    letters = set(s) - set(c)
    for l in letters:
        s = s.replace(l, '*')
    
    print(s)
    

if __name__ == '__main__':
    main()

Solution (Python):

import sys
from string import ascii_lowercase as alphabet


def main():
    n, s, k = sys.stdin.read().split()
    n, k = map(int, [n, k])

    c = s[k-1]
    for l in alphabet:
        if l != c:
            s = s.replace(l, '*')
    
    print(s)
    

if __name__ == '__main__':
    main()

Solution (Python):
import re
n,s,k=open(0)
print(re.sub("[^" + s[int(k)-1] + "]", "*", s[:-1]))

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):
N = int(input())
S = list(input())
K = int(input())
tag = S[K - 1]
for i in range(N):
    if S[i] == tag:
        continue
    else:
        S[i] = "*"
print("".join(S))

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

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

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

s_i = S[K-1]
for i in range(len(S)):
    if(S[i]==s_i):
        s += s_i
    else:
        s += "*"
        
print(s)

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

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

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

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

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

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

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

ss = list(s)
chr = ss[k - 1]
for i in range(n):
    if ss[i] != chr:
        ss[i] = '*'
for i in range(n):
    print(ss[i], end = '')

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

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

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

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

print(ns)

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

key = s[k-1]
for i in range(n):
    if s[i] != key:
        s[i] = "*"
s = "".join(s)
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()
K = int(input())

key = S[K - 1]
ans = []

for char in S:
    if char != key:
        ans.append("*")
    else:
        ans.append(char)

print(*ans, sep="")

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

Solution (Python):
N = int(input())
S = [str(x) for x in input()]
K = int(input())
for a in range(N):
    if not S[a] == S[K - 1]:
        S[a] = '*'
print(''.join(S))

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

print("")

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

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

print("")

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

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

ans = []


for i in range(n):
    if s[i] == s[k]:
        ans.append(s[k])
    else:
        ans.append("*")
print(*ans,sep = "")

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

Solution (Python):

import sys


def solve(N: int, S: str, K: int):
    S = list(S)
    t = S[K-1]
    for i in range(len(S)):
        if(S[i] != t):
            S[i] = '*'
        
    print(''.join(S))

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    S = next(tokens)  
    K = int(next(tokens))  
    solve(N, S, K)

if __name__ == '__main__':
    main()

Solution (Python):
Length = int(input())
inputString = input()
SpecialIndex = int(input())
SpecialChar = inputString[SpecialIndex-1]
answer = ""
for i in inputString:
  if i != SpecialChar:
    answer += "*"
  else:
    answer += i
print(answer)

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

Solution (Python):
size = int(input())
word = input()
index = int(input())
new_word = [i if i == word[index-1] else '*' for i in word]
print("".join(new_word))

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

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

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

c = str[k-1]
str2 = ""
for char in str:
  if char == c:
    str2 += c
  else:
    str2 += "*"
    
print(str2)

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    s = str(input().rstrip('\n'))
    k = int(input().rstrip('\n'))
    ls = []
    for i in range(n):
        if s[i] != s[k-1]:
            ls.append("*")
        else:
            ls.append(s[i])
    print("".join(ls))


if __name__ == '__main__':
    slove()

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

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

Solution (Python):
n=int(input())
s=input()
k=int(input())
print(''.join([x if x==s[k-1] else '*' for x in 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())

T = S[K-1]
res = [s if s==T else "*" for s in S]
print("".join(res))

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

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

print("".join(ans))

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    s = list(str(input().rstrip('\n')))
    k = int(input().rstrip('\n'))
    ts = s[k-1]
    for i in range(n):
        if s[i] != ts:
            s[i] = "*"
    print("".join(s))


if __name__ == '__main__':
    slove()

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 = list(input().strip())
k = int(input())

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

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

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

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

Solution (Python):

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

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

Z = ''.join(S)
print(Z)

Solution (Python):
import sys
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
s = ns()
k = ni()


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

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

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

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

for i in range(n):
    if s[i]!=a:
        s=s[:i]+'*'+s[i+1:]
print(s)

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

print("".join(S_list))

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, L, K = [input() for i in range(3)]
L_replace = [("*" if (i != L[int(K)-1]) else  i) for i in L]
print("".join(L_replace))

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

for index,value in enumerate(S,start=1):

    if value != S[K-1] :

        S = S.replace(value,'*')

    elif value == '*' or value == S[K-1]:

        continue


print(S)

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

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

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

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

for i in list("abcdefghijklmnopqrstuvwxyz"):
  if i!=s:
    S=S.replace(i,"*")
print(S)

Solution (Python):

def main():
    N, S, K = open(0).read().split()
    tgt = S[int(K) - 1]
    ans = [i if i == tgt else "*" for i in S]
    print("".join(ans))


if __name__ == "__main__":
    main()

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

mark=s[k-1]

for i in range(n):
    if s[i]!=mark:
        s=s.replace(s[i],"*")
print(s)

Solution (Python):


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

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

ta = S[k-1]
    
for i in range(n):
    if S[i] == ta:
        print(S[i],end = "")

    else:
        print("*",end = "")

Solution (Python):


N, S, K = int(input()), input(), int(input())
char = S[K - 1]
A = ''
for i in range(len(S)):
    if S[i] == char:
        A += S[i]
    else:
        A += '*'
print(A)

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

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

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

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

e=s[k-1]

ans=''
for i in range(n):
    if s[i]==e:
        ans+=e
    else:
        ans+='*'
print(ans)

Solution (Python):


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

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

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

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

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

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

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

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

S = [c for c in S_temp]

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

Solution (Python):
n = int(input())
s = input()
k = int(input())
for i in set(s):
    if i == s[k-1]:
        continue
    else:
        s = s.replace(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()
k = int(input())

sk = s[k-1]

new_s = ""
for cal in s:
  if cal != sk:
    new_s += "*"
  else:
    new_s += sk
print(new_s)

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

a=''

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

print(a)

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

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

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

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

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

Solution (Python):
def main():

    N = int(input())
    S = input()
    K = int(input())
    ref = S[K-1]
    t = ""
    for c in S:
        if c == ref:
            t += ref
        else:
            t += "*"
    return t

if __name__ == '__main__':
    print(main())

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

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

target_word = string[m-1]

char_list = []

for i in range(n):
  if target_word == string[i]:
    char_list.append(target_word)
  else:
    char_list.append('*')
    
print(*char_list, sep = '')

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

Solution (Python):
import re
n = int(input())
s = input()
k = int(input())
x = s[k-1]
print(re.sub('[^' + x + ']', '*', s))

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

l_s = list(s)
for i in range(n):
    if not l_s[i] == l_s[k-1]:
        l_s[i] = '*'
print(''.join(l_s))

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

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

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

kc = S[K - 1]
ans = ''
for c in S:
  if c != kc:
    ans += '*'
  else:
    ans += c

print(ans)