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

No_change=S[K-1]

out=[]
for s in S:
  s_temp=s
  if s != No_change:
    s_temp='*'
  out.append(s_temp)
  
out_str=''
for o in out:
  out_str+=o
  
print(out_str)

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

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

print("".join(str))

Solution (Python):

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

t = S[K-1]
tl = set(list(S))
ans = S
for n in tl:
  if n != t:
    ans = ans.replace(n, "*")
print(ans)

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

str= list(s)
target = str[k-1]

for i in range(n):
  if str[i] != target:
    str[i] = "*"

s_c = "".join(str) 

print(s_c)

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

targetalpha = S[int(K)-1]
S_list = list(S)

for i in range(0,int(N)):
  if(S_list[i] != targetalpha):
    S_list[i] = "*"
  
S = "".join(S_list)
print(S)

Solution (Python):
import sys

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

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

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

tmp = s[int(k)-1]
ret = ""
for i in range(int(n)):
    if not s[i] == tmp:
        ret+='*'
    else:
        ret+=s[i]

print(ret)

Solution (Python):
import re

N=int(input())
S=input()
K=int(input())
regex="[^"+S[K-1]+"]"
ans=re.sub(regex,"*",S)
print(ans)

Solution (Python):

def main():
    C=[]
    for i in range(3):
        C.append((input()))

    line = list(C[1])

    for i in range(int(C[0])):
        if line[i] != line[int(C[2])-1]:
            line[i] = "*"

    ans = ""
    for i in line:
        ans +=i

    return ans

print(main())

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

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

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

target_char = S[K-1]
for num in range(N):
    if S[num] != target_char:
        S = S[:num] + '*' + S[num + 1:]

print(S)

Solution (Python):

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

x = S[K-1]

for i in range(len(S)):
    if S[i] != x:
        S = S.replace(S[i], '*')



print(S)

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

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

Solution (Python):
from sys import stdin
input=[]
for i in range(3):
    input.append(stdin.readline().rstrip())

input[0]=int(input[0])
input[2]=int(input[2])
flag=input[1][input[2]-1]
output=""
for i in range(input[0]):
    if input[1][i]!=flag:
        
        output+="*"
    else:
        output+=flag
print(output)

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

c = s[k - 1]
r = []
for letter in list(s):
    e = '*' if letter is not c else c
    r.append(e)

print(''.join(r))

Solution (Python):



import numpy as np
import scipy as sp

def main():
    while True:
        try:
            il = [input() for i in range(3)]
            N = int(il[0])
            S = il[1]
            K = int(il[2])

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

            print(res)


        except:
            break

if __name__ == '__main__':
    main()

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

char = S[K-1]
string = []
for i in S:
  if (i == char):
    string.append(i)
  else:
    string.append("*")
result = ''.join(string)
print(result)

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

key = s[k-1]

for x in s:
    if x != key:
        s = s.replace(x, '*')
        
print(s)

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

tmp_string = s[k - 1]

for c in s:
    if c == tmp_string:
        print(tmp_string, end="")
    else:
        print("*", end="")
print()

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

chk1 = s[k-1]

for i in range(len(s)):
    if s[i] != chk1:
        chk2 = s[i]
        s = s.replace(chk2,"*")
        
print(s)

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

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], '*')
    
print(S)

Solution (Python):
import re
N = int(input())
s = input()
index = int(input())-1

ss = s[index]
ans = s
for ii, i in enumerate(s):
  if i != ss:
    ans = ans.replace(i, '*')
print(ans)

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

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

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

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

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

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

Solution (Python):
a = int(input())
word = input()
b = int(input())
c = []
d = ""
for i in range(a):
  if word[i] != word[b-1]:
    c.append("*")
  else:
    c.append(word[i])
for i in range(a):
  d += c[i]
print(d)

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

sk = S[K-1]

result = []
for s in S:
	if s != sk:
		result.append("*")
	else:
		result.append(s)
 
print("".join(result))

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

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

print()

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

s = S[K-1]
lett = ""

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

print(lett)

Solution (Python):
N = int(input())
S = input().rstrip()
K = int(input())
str_k = S[K-1:K]

result = ""
for s in S:
    if s != str_k:
        result += '*'
    else:
        result += s

print(result)

Solution (Python):
length=int(input())
string=list(input())
K=int(input())

key=string[K-1]

for i in range(length):
    if key != string[i]:
        string[i] = "*"
        
for j in range(length):
    print(string[j],end="")

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

N=int(N)
k=int(k)

ward=s[k-1]

for i in range(len(s)):
    if(s[i]==ward):
        print(ward ,end="")
    else:
        print("*" ,end="")
print("")

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

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

Solution (Python):


import sys
import math


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

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

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

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

Solution (Python):


n = int(input())

s = input()

k = int(input())

s1 = s[k-1]

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

Solution (Python):
N = int(input())
S = str(input().strip())
K = int(input())
ret = []
target_char = S[K-1]
for char in S:
    if char == target_char:
        ret.append(target_char)
    else:
        ret.append("*")
print("".join(ret))

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

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

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

Solution (Python):

 
N = int(input())
S = input()
K = int(input())
 
result = ''
sk = S[K-1]

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

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

print("".join(s))

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

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

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

print(''.join(l))

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

ans = ""

for char in S:
    ans += c if char == c else "*"

print(ans)

Solution (Python):


b=input()
s=input()
n=int(input())-1
a=s[n]
ans=""

for i in range(len(s)):
    m=s[i]
    if(s[i]!=a):
        m="*"
    ans+=m
print(ans)

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

target = S[K-1]


s = list(S)
for index in range(len(s)):
    if s[index] != target:
        s[index] = '*'

print("".join(s))

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

char_list = list(char)

replace = char_list[k]

result = ""

for i in char_list:
    if i==replace:
        result += replace
    else:
        result += "*"

print(result)

Solution (Python):

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

p = s[k-1]
out = ""
for c in s:
	if(c == p):
		out += c
	else:
		out += "*"

print(out)

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

ans = ''
for i, s in enumerate(s_):
    if s != s_[k]:
        ans += '*'
    else:
        ans += s
print(ans)

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

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

Solution (Python):
if __name__ == '__main__':
    N = int(input())
    S = str(input())
    K = int(input())

    replace_str = S[K-1]
    list_S = list(S)

    for i in range(0, N):
        if list_S[i] == replace_str:
            continue
        else:
            list_S[i] = "*"

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

Solution (Python):
import re
import string
import sys
from itertools import product

import numpy as np

sys.setrecursionlimit(200000)


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


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    N = ii()
    S = ii(str)
    K = ii()
    a = S[K - 1]
    for s in string.ascii_lowercase:
        if s == a:
            continue
        S = S.replace(s, "*")
    return S


if __name__ == "__main__":
    print(solve())

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

s = list(S)

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

S = "".join(s)

print(S)

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

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

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

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

Solution (Python):


import sys
input = sys.stdin.readline

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

moji = S[K - 1]

for s in S:
    print("*" if s != moji else s, end="")

print()

Solution (Python):
n = int(input())
st = input().strip()
m = int(input())
d = st[m-1]
for i in range(n):
  if st[i] != d:
    print('*',end='')
  else:
    print(d, end='')

Solution (Python):
n = int(input())
s = list(input())
k = int(input())
q = ''
ans = s[k-1]
for i, w in enumerate(s):
    if not w == ans:
        s[i] = '*'

for x in s:
    q += x
print(q)

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

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

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

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

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

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

print(S)

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

s=a[k-1]

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

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

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

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

S_list = [S[i] for i in range(len(S))]

kekka = ""
for x in S_list:
    if x!=S[K-1]:
        kekka += "*"
    else :
        kekka += S[K-1]


print(kekka)

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

for i in range(N):
    if S[i] == s:
        pass
    else:
        S[i] = '*'

print(''.join(S))

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

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())
S = stdin.readline().rstrip()
K = int(stdin.readline().rstrip())

chr = S[K-1]
ans = S
for c in range(0,N):
    if S[c] != chr:
        ans = ans.replace(S[c],'*')
print(ans)

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

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

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

print(''.join(answer))

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

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

s = list(S)

t = s[K - 1]

i = 0
for c in s:
    if t != c:
        s[i] = '*'
    i += 1

print(''.join(s))

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

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

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

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

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

print(s)

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

mask = S[K-1]

ret = []
for s in S:
  if s == mask:
    ret.append(s)
  else:
    ret.append('*')

print(''.join(ret))

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

print(ans)

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

ans = ['*'] * len(s)
replace = s[k-1]

for i in range(len(s)):
  if s[i] == replace:
    ans[i] = replace
print("".join(ans))

Solution (Python):
if __name__ == '__main__':
    n = int(input())
    s = input()
    k = int(input())
    sk = s[k-1]
    anslst = []
    for i in s:
        if sk != i:
            anslst.append("*")
        else:
            anslst.append(sk)
    for a in anslst:
        print(a, end="")
    print("\n")

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

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

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

target = S[K-1]

ans = ''

for c in S:
    if c != target:
        ans += '*'
    else:
        ans += target

print(ans)

Solution (Python):

def main():
    n = int(input())
    s = list(input())
    k = int(input())

    c = s[k-1]
    for i, _ in enumerate(s):
        s[i] = "*" if s[i] != c else s[i]

    return "".join(s)


print(main())

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

Solution (Python):
n = int(input())
s = list(input())
c = int(input())
for i in range(0,n):
  if s[i] == s[c-1]:
    continue
  else:
    s[i] = '*'
    
str = ''.join(s)

print(str)

Solution (Python):
N = input()
S = input()
K = input()
result = []

target = S[int(K) - 1]

stringlist = list(S)
for i in stringlist:
    if target != i:
        result.append("*")
    else:
        result.append(i)

print("".join(result))

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

focus=s[k-1]
ans=""


for str_k in s:
  if str_k==focus:
    ans=ans+str_k
  else:
    ans=ans+"*"
print(ans)

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

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


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

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

e = s[k-1]

res = ''
for c in s:
    if c != e:
        res += '*'
    else:
        res += e

print(res)

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

c = s[k - 1]
ans_list = ["*" if i != c else i for i in s]
ans = ""
ans = ans.join(ans_list)
print(ans)

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

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

news=[]

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

ans = ""        
for i in news:
    ans += i

print(ans)

Solution (Python):


import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]


    n = int(lines[0])
    s = lines[1]
    k = int(lines[2])

    return (n, s, k)


def solve(n, s, k):


    c = s[k-1]

    result = []
    for d in s:
        if c == d:
            result.append(c)
        else:
            result.append("*")

    return "".join(result)


def main():
    

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()

Solution (Python):
import re
input()
s = input()
l = s[int(input())-1]
pat = '[^{}]'.format(l)
x = re.sub(pat, '*',  s)
print(x)

Solution (Python):
import re

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

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

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

a = s[k-1]
li = []
s2 = ''

for i in range(n):
    if s[i] != a:
        li.append(i)

for i in range(n):
    if i in li:
        s2 = s2 + '*'
    else:
        s2 = s2 + s[i]

print(s2)

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

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

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

Solution (Python):
import sys
input=sys.stdin.readline
 
N=int(input())
S=input()[:-1]
K=int(input())-1
for s in S:
  if s != S[K]:
    print("*",end='')
  else:
    print(s,end='')
print()

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

t = S[K - 1]

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

print(ans)

Solution (Python):
_ = input()
s = input()
target = int(input()) - 1

result = []
for c in s:
  if c != s[target]:
    result.append('*')
  else:
    result.append(c)
    
print(''.join(result))

Solution (Python):
length = int(input())

words = input()
words = list(words)

target = int(input())

char = words[target-1]

for word in words:
    if word == char:
        print(word,end='')
    else:
        print('*',end='')

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

b=""

a=tex[k-1]

for i in range(n):
    if tex[i]!=a:
        b=b+"*"
    else:
        b=b+a
print(b)

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

correct = s[k-1]
ans =""
for i in s:
    if i != correct:
        ans += "*"
    else:
        ans+= i

print(ans)

Solution (Python):
n=int(input())
s=input()
l=int(input())
x=s[l-1]
for i in range(n):
    if s[i]!=x:
        s=s.replace(s[i],"*")
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())

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

Solution (Python):

n = int(input())
S = input()
k = int(input())
char = S[k-1]
S = [s if s == char else '*' for s in S]
print ("".join(S))

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

Solution (Python):
import sys

N = int(sys.stdin.readline())
S = input()
K = int(sys.stdin.readline())




sk = S[K-1]
out = ""
for s in S:
    if sk==s:
        out += s

    else:
        out += "*"

print(out)

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

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

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

_char = S[K-1]
_char_indexes = [i for i in range(N) if S[i]==_char]
answer=list("*"*N)
for i in _char_indexes:
    answer[i]=_char
print("".join(answer))

Solution (Python):
import string

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

remain = s[k-1]

for char in string.ascii_lowercase:
	if char == remain:
		continue
	else:
		s = s.replace(char, '*')
		
print(s)

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

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

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

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

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

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

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

Solution (Python):
N=int(input())
S=input()
K=int(input())
tmp=[]

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

Solution (Python):

"""
Created on Sat Apr 20 21:06:53 2019

@author: doppe
"""

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

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

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

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

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

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

for _s in s:
    if not _s == rep:
        ans = ans + '*'
    else:
        ans = ans + _s

print(ans)

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

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

Solution (Python):



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



tmp = S[K-1]

ans = []
for i in S:
    if (i == tmp) :
        ans.append(tmp)
    else:
        ans.append("*")

print("".join(ans))

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]='*'
    else:
        pass
print(''.join(S))

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

buff = S[K-1]
for i in range(len(S)):
    if buff != S[i]:
        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.replace(S[i],'*')
print(S)

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

target = S[K - 1]
converted = []
for c in S:
    if c != target:
        c = "*"
    converted.append(c)
print("".join(converted))

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

letter = S[K-1]

out = ''
for s in S:
    if s == letter:
        out += s
    else:
        out += '*'
print(out)

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

c = S[K-1]
for i in range(len(S)):
    if S[i] != c:
        S = S[:i] + '*' + S[i+1:]
print(S)

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

word = S[K-1:K]
S_new = ""

for i in range(N):
    if S[i:i+1] == word:
        S_new += word
    else:
        S_new += "*"
        
print(S_new)

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

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

k = S[K-1]
l = [''] * N

for i, s in enumerate(S):
    if s == k:
        l[i] = s
    else:
        l[i] = "*"
print("".join(l))

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

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

Solution (Python):
nons = input()
a = input()
b = list(a)
c= int(input())
d = b[c-1]
result = str()
for i in range(0,len(b)):
    if b[i] == d:
        pass
    else:
        b[i] = '*'
for i in range(len(b)):
    result = result+b[i]
print(result)

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

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

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

c = s[int(k) - 1]

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

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

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

print(S)

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

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

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

print(S)

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

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

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

r_list = []
k = S[K-1]
for s in S:
  if s == k:
    r_list.append(s)
  else:
    r_list.append("*")
r_seq = "".join(r_list)
print(r_seq)

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