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())
change_word = S[K-1]
S_list = list(S)
for i, word in enumerate(S_list):
    if word != change_word:
        S_list[i] = '*'
print(''.join(S_list))

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

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

lsts=list(s)
a=k-1
chara=lsts[a]

ss=copy.copy(s)
lstss=list(ss)

for i in range(n):
    if lstss[i]!=chara:
        lsts[i]="*"

ans=""
for i in range(n):
    ans+=lsts[i]

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+=i
    else: ans+="*"

print(ans)

Solution (Python):
import re

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

err = s[k-1]
s = re.sub("[^"+err+"]", "*", 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],"*")
    else:
        pass
print(s)

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

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

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

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

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

p = S[K-1]
result = ''
for s in S:
    if s == p:
        result += s
    else:
        result += '*'

print(result)

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

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

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


target_str = S[K-1]

out = ''
for s in S:
  if s != target_str:
    tmp = '*'
  else:
    tmp = s

  out += tmp

print(out)

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

t = S[K-1]

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

Solution (Python):




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


m = [i for i in S]
mm = S[K-1]

moji = ""
for n in S:
    if n==mm:
        moji += n
    else:
        moji+="*"


print(moji)

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

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


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


def B():
    n = II()
    s = input()
    a = list(set(list(s)))
    k = II()-1
    for i in a:
        if s[k] != i:
            s = s.replace(i, "*")
    print(s)
    return


def C():
    n = II()
    s = S()
    s.append(0)
    ans = 0
    for k in range(n):
        if s[k] == 0:
            break
        if s[k] == "
            ans += 1
    print(ans)
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    B()

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 += a
    else:
        ans += "*"
print(ans)

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

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

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

list_s = list(s)

target_chr = list_s[k - 1]

result = ""

for i in list_s:
    if i != target_chr:
        result += "*"
    else:
        result += i


print(result)

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

letter=S[K-1]
for i in range(len(S)):
    if S[i]!=letter:
        S[i]="*"
        
word="".join(S)
print(word)

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

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

s = S[K-1]

for i in S:
  if i == s:
    print(i, end='')
  else:
    print('*', end='')

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

for s in S:
  if s not in [target]:
    print('*', end='')
  else:
    print(s, end='')

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

moji = s[k-1]
ans = ""
for i in range(len(s)):
    if s[i] != moji:
        ans += str("*")
    else:
        ans += str(s[i])
    
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] = "*"

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

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

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

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

for i in range(len(ans)):
    print(ans[i],end='')

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

a = S[K-1]

for i in range(N):
    if S[i] != a:
        print("*", end="")
    else:
        print(S[i], end="")

print()

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] = "*"
print("".join(S))

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

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

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

Solution (Python):
def main():
    n = int(input())
    s = input().rstrip()
    k = int(input()) 
    l = s[k-1]
    char_array = [None] * n
    for i, c in enumerate(s):
        if c != l:
            char_array[i] = '*'
        else:
            char_array[i] = l
    print(''.join(char_array))


if __name__ == "__main__":
    main()

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

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

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

rest_char = S[K]

for i in range(len(S)):
    if S[i] != rest_char:
        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(s, end='')
    else:
        print('*', end='')

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

sk = S[K-1]

for i in range(N):
    if not(S[i]==sk):
        S[i]='*'


print(''.join(S))

Solution (Python):
from sys import stdin
import re

n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()
k = int(stdin.readline().rstrip())

c = "[^"+s[k-1]+"]"

ans = re.sub(c, '*', s)

print(ans)

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

Solution (Python):
N = int(input())
S = input().rstrip()
K = int(input())
char = S[K-1]
answer = ["*"]*N
next_index = 0
index_list = []
for i in range(N):
    now = S.find(char, next_index)
    if now == -1:
        break
    next_index = now + 1 
    index_list.append(now)
for i in index_list:
    answer[i] = char
print(*answer, sep="")

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

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

print(''.join(strlist))

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

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


S_list = list(S)

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

print("".join(S_list))

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

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

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

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

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

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

Solution (Python):
a = int(input())
b = input()
c = int(input())

ans = b
for i in range(a):
  if(b[i] != b[c - 1]):
    ans = ans.replace(b[i],'*')
print(ans)

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

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

print("".join(sl))

Solution (Python):
N = int(input())
s = input()
k = int(input())
l = []
for i in range(N):
    l.append(s[i])

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

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

target = s[k-1]

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

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] = "*"

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

Solution (Python):
N=input()
s=list(input())
idx=int(input())
z=s[idx-1]
for it in s:
    if it == z:
        print(it,end="")
    else:
        print("*",end="")
print()

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

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

print(out)

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

x = S[K-1]

for i in range(len(S)):
    if not S[i] == x:
        S = S[:i] + "*" + S[i+1:]

print(S)

Solution (Python):
N = int(input())
S = input()
K = int(input())
target = S[K-1]
S_list = [c for c in S]
for i,char in enumerate(S_list):
    if char != target:
        S_list[i] = "*"
print("".join(S_list))

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

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

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

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

kome = S[K - 1]

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

s = ""
for i in range(N):
    s += str(S[i])
    
print(s)

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

temp=s[k-1]


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

print(ans)

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

t = S[K - 1]

print(''.join([s if s == t else '*' for s in S]))

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

string = S[K - 1]

new_string = ""
for i, v in enumerate(S):
    if S[i] != string:
        new_string += "*"
    else:
        new_string += S[i]

print(new_string)

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

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

target = k[s -1]

for i in range(len(k)):
    if k[i] != target:
        k[i] = '*'
print(''.join(k))

Solution (Python):
import re

def solve():
  N = int(input())
  S = input()
  K = int(input())
  return re.sub('[^' + S[K - 1] + ']', '*', S)

print(solve())

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

tmp = str(S[K-1])
l = []
for n,i in enumerate(S):
    if i==tmp:
        l.append(i)
    else:
        l.append('*')
print("".join(l))

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

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

print(S)

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

char = s[k-1]


result=''
for i in range(n):
    if s[i] != char:
        result += '*'
    else:
        result += s[i]

print(result)

Solution (Python):
import re

N = int(input())
S = input()
K = int(input())
print(re.sub(r'[^{}]'.format(S[K-1]), '*', S))

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


print(''.join(list(map(lambda x : x if x == S[K-1] else '*', S))))

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

Solution (Python):
n=3
string_list=[input() for i in range(n)]
c=''
for strng in string_list[1]:
    if strng==string_list[1][int(string_list[2])-1]:
        c+=strng
    else:
        c+='*'
print(c)

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

Solution (Python):

import sys,re



def solve(lines):
    N = int(lines.pop(0))
    S = lines.pop(0)
    K = int(lines.pop(0))
    c = S[K-1:K]
    print(re.sub(r"[^{}]".format(c),'*',S))

lines = [x.strip() for x in sys.stdin.readlines()]
solve(lines)

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

Solution (Python):



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

result = ""
for i in s:
    if i is s[k-1]:
        result += i
    else:
        result += "*"

print(result)

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

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

Solution (Python):
def main():
    _ = int(input())
    s = input()
    k = int(input())
    ans = ''
    r = s[k - 1]
    for char in s:
        if char == r:
            ans += char
        else:
            ans += '*'

    print(ans)


main()

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

Solution (Python):


from sys import stdin

def main():
    _ = stdin.readline().rstrip()
    s = stdin.readline().rstrip()
    k = int(stdin.readline())

    target = s[k-1]
    ans = ''

    for c in s:
        if c == target:
            ans += c
        else:
            ans += '*'
    print(ans)

if __name__=='__main__':
    main()

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

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

print(ans)

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

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

print(new_S)

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

ka = S[K-1]

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

print("".join(S))

Solution (Python):
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def ii(): return int(stdin.readline())
def li(): return map(int, stdin.readline().split())
def ns(): return stdin.readline().rstrip()
N = ii()
S = ns()
K = ii()
sym = S[K-1]

new = [ s if s == sym else "*" for s in S]
print(''.join(new))

Solution (Python):
N = int(input())
S = input()
K = int(input())
a = S[K-1]
ans = ''
for x in S:
    if x == a:
        ans += a
    else:
        ans += '*'
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):
str_len = int(input())
input_str = input()
target_char_num = int(input())
target_char = input_str[target_char_num-1]



print_str = ''

for i in range(str_len):
  if input_str[i] != target_char:
    print_str = print_str + '*'
  else:
    print_str = print_str + target_char

print(print_str)

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


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


print(''.join(ans))

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

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

letter = S[K-1]

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

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

c = s[k-1]

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

for j in s:
    print(j,end = "")

Solution (Python):

N = int(input())
S = list(input())
K = int(input()) - 1
str = S[K]
print(''.join([i if i == str else '*' for i in S]))

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

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

print(ans)

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

key = S[K]
S_list = list(S)
for i in range(N):
    if S_list[i] != key:
        S_list[i] = "*"

ans = ""
for i in S_list:
    ans += i
print(ans)

Solution (Python):

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

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

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

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

error = s[k-1]

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

Solution (Python):

import re
import bisect
from datetime import datetime as dt
N = input()
S = raw_input()
K = input()
a = S[K - 1]
b = ''
for i in range(len(S)):
    if S[i] != a:
        b += '*'
    else:
        b += a
print b

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

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

target = s[k-1]

print("".join(c if c == target else '*' for c in list(s)))

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

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

let = s[k-1]
new = ''
for i in s:
    if i == let:
        new += i
    else:
        new+= "*"

print(new)

Solution (Python):
import re

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

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

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

ans = []
c = S[K-1]
for s in S:
    if s!=c:
        ans.append('*')
    else:
        ans.append(c)
print(''.join(ans))

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

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

Sk = S[K-1]

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

output = ""

for j in S:
    output = output + j

print(output)

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

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

print(''.join(map(lambda s: '*' if s != S[K-1] else s, S)))

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

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

print(''.join([x if x == s[k-1] else '*' for x in list(s)]))

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

Solution (Python):
import sys


l = raw_input().split()
N = int(l[0])
l = raw_input().split()
S = l[0]
l = raw_input().split()
K = int(l[0])

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

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

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

print(''.join(S))

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

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

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

huga=hoge[k-1]

for i in range(n):
  if(hoge[i]==huga):
    print(huga,end="")
  else:
    print("*",end="")
    
print("")

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 += "*"
    else :
        ans += s[i]
print(ans)

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

S_k = S[K-1]

ans = []

for i in range(len(S)):
  if S[i] != S_k:
    ans.append('*')
  else:
    ans.append(S[i])
print(''.join(ans))

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

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

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

for i in range(N):
    print(s[i], end = '')

print()

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

nokoru=S[K-1]

ans=""
for i in range(N):
	if S[i]==nokoru:
		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 s:
  if i==c:
    ans+=c
  else:
    ans+="*"
print(ans)

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

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

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

target = s[k-1]

ans = ""

for ss in s:
	if(ss == target):
		ans += ss
	else:
		ans += "*"
print(ans)

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

sub = s[k-1]

for i in range(len(s)):
    if s[i] != sub:
        s[i] = '*'

print(''.join(s))

Solution (Python):


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

del_char = s[a-1]

for i in range(len(s)):
    if(s[i] == del_char):
        continue
    else:
        s[i] = "*"

print("".join(s))

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

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

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

print()

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

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

Solution (Python):


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

target = S[K-1]

result = ''
for string in S:
    if string == target:
        result += string
    else:
        result += '*'

print(result)

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

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

ans = list()
for c in S:
    if c == S[K]:
        ans.append(c)
    else:
        ans.append('*')

print(''.join(ans))

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





mask = s[k-1]


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

print("".join(ans))

Solution (Python):
N = int(input())
S = input()
K = int(input())
x = S[K-1]
SS = []
for i in range(N):
    if not S[i] == x:
        SS.append("*")
    else:
        SS.append(x)
for c in SS:
    print(c,end = "")
print()

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

Solution (Python):



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


def r(c):
    if c == S[K - 1]:
        return c
    else:
        return '*'


print(''.join(map(r, S)))

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

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

y = ''
for i in range(N):
    y += T[i]

print(y)

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

a= s[k-1]

res = ""
for idx,x in enumerate(s):
    if s[idx] != a:
        res += "*"
    else:
        res += x
print(res)

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

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

print(ans)

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

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
input = sys.stdin.readline




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

	S=S[:-1]
	
	tmp = S[K-1]

	ans = ""
	for i in S:
		if i == tmp:
			ans += i
		else:
			ans += "*"

	print(ans)

	
	
if __name__ == "__main__":
	main()

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

ans = []
c = S[K-1]
for s in S:
    if s!=c:
        ans.append('*')
    else:
        ans.append(c)
print(''.join(ans))

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

o = s[k-1]
ans = [i if i == o else '*' for i in s]
print(''.join(ans))

Solution (Python):
_ = int(input().strip())
S = input().strip()
K = int(input().strip())

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

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

without_change_str = s[k - 1]

result = ""
for char in s:
    result += char if char == without_change_str else "*"
print(result)

Solution (Python):
N = int(input())
S = input()
K = int(input())
x = S[K-1]
SS = []
for i in range(N):
    if not S[i] == x:
        SS.append("*")
    else:
        SS.append(x)
for c in SS:
    print(c,end = "")
print()

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

for i in range(len(s)):
    if s[i] != s[k]:
        s[i] = '*'

print("".join(s))

Solution (Python):
import collections
n = int(input())
a = list(input())
k = int(input())

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

Solution (Python):
import re

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

key = S[K - 1]

print(re.sub("[^" + key + "]", "*", S))

Solution (Python):
from sys import stdin

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

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

input = lambda: stdin.readline().rstrip()
main()

Solution (Python):
def main():
    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))


main()

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

list = []

for s in S:
    if s == S[K-1]:
        list.append(s)
    else:
        list.append('*')

print(''.join(list))