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

import numpy as np





N = int(stdin.readline().rstrip().split()[0])
S = stdin.readline().rstrip().split()[0]
K = int(stdin.readline().rstrip().split()[0])

K = K-1

S_k = S[K]
arr = ""
for s in S:
  if s==S_k:
    arr += s
  else:
    arr += "*"
print(arr)

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

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

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

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

lst_s = list(s)
for i, si in enumerate(s):
    if si != s[k-1]:
        lst_s[i] = '*'

print(''.join(lst_s))

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

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

_c = s[k - 1]
_s = ""

for c in s:
    if c != _c:
        _s += "*"
    else:
        _s += c

print(_s)

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

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

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

s_k = S[K-1]

output = ""
for s in S:
    if s == s_k:
        output += s_k
    else:
        output += "*"

print(output)

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

c = S[K-1]

l = ""
for s in S:
    if s == c:
        l += c
    else:
        l += "*"

print(l)

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

tg=s[k-1]

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

print(''.join(s))

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

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

keyword = S[K - 1]

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

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

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

moji = b[c - 1]

for i in range(a):
    if b[i] != moji:
        b[i] = '*'

b = ''.join(b)
print(b)

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

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

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

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

print(s)

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

t = s[k-1]
ans = ""
for ch in s:
    if ch == t:
        ans+=t
    else:
        ans+="*"

print(ans)

Solution (Python):
from sys import stdin
import math
import itertools


def makeIntMatrix(lines):
    intMatrix = []
    for a in makeStringMatrix(lines):
        intMatrix.append([int(b) for b in a])
    return intMatrix
 
 
def makeStringMatrix(lines):
    stringMatrix = [line.split() for line in lines]
    return stringMatrix
 
 
def makeInt(line):
    return int(line.rstrip())
 
 
def makeMultiInteger(line):
    return [int(x) for x in line.rstrip().split()]


def solve(input_string):
    N = makeInt(input_string[0])
    S = input_string[1].rstrip()
    K = makeInt(input_string[2])
    r = S[K-1]
    rS = ""
    for t in S:
        
        if t != r:
            rS += "*"
        else:
            rS += t
    return rS


def main():
    input_lines = stdin.readlines()
    answer = solve(input_lines)
    print(answer)


if __name__ == '__main__':
    main()

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

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

print(re)

Solution (Python):



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

k = s[k-1]

print("".join([k if i==k else "*" for i in s]))

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

S = list(S)
x = S[K-1]
S_index = [i for i in range(N) if S[i] != x]

for j in S_index:
  S[j] = "*"
  
print("".join(S))

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

Solution (Python):
import sys

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

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

print(ss)

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

S = list(S)
chr = S[k-1]
for i in range(n):
    if S[i] != chr:
        S[i] = '*'
S = ''.join(S)
print(S)

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

c = S[K]

l = ""

for d in S:
    if d == c:
        l = l + d
    else:
        l = l + "*"

print(l)

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

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

c = s[k-1]

output = []
for i in range(n):
        if(s[i] == c):
                output.append(c)
        else:
                output.append("*")
print(''.join(output))

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

target = S[K-1]

ans = ''
for i in range(len(S)):
    if S[i] == target:
        ans += ''.join(S[i])
    else:
        ans += ''.join('*')

print(ans)

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

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

er = S[K-1]
Ss = [i if i == er else "*" for i in S]
a = ""
for i in Ss:
    a += i
print(a)

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

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

no_change = S[K-1]

for i in S:
    if i != no_change:
        print("*",end = "")
    else:
        print(i,end="")
print()

Solution (Python):
from collections import defaultdict
from string import ascii_uppercase
import sys, bisect, math
stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N = read_int()[0]
S = read_str()
K = read_int()[0]

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

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

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

s_i = s[k-1]

s_ans = ''
for i in s:
  if i == s_i:
    s_ans += i
  else:
    s_ans += '*'

print(s_ans)

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

Solution (Python):
import re

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

ks = S[K-1]
print(re.sub(r"[^{}]".format(ks), "*", S))

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

Solution (Python):


def main():
    N = int(input())
    S = input()
    K = int(input())
    change = S[K-1]
    
    str_list = list(S)
    ans = []
    for i in str_list:
        if i != change:
            ans.append("*")
        else:
            ans.append(i)
    str_changed = "".join(ans)
    print(str_changed)


if __name__ == "__main__":
    main()

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

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

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

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

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

tmp = S[K-1]
st = ""
for t in S:
    if t != tmp:
        st = st + "*"
    else:
        st = st + t

print(st)

Solution (Python):
from sys import stdin
N=int(stdin.readline().rstrip())
S=(stdin.readline().rstrip())
K=int(stdin.readline().rstrip())
s=S[K-1]

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

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

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

Solution (Python):
if __name__ == '__main__':
    n = int(input())
    s = input()
    k = int(input())

    ret = ''
    for c in s:
        if c == s[k-1]:
            ret += c
        else:
            ret += '*'

    print(ret)

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

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline

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

k = int(input())

temp = s[k-1]



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


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

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

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

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

Solution (Python):
_, string, pos = [raw_input() for i in range(3)]
char = string[int(pos) - 1]
out = ""
for i in string:
    out += (i if i == char else "*")
print(out)

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

char = s[k-1]

return_ = []

for i in range(n):
    if s[i] != char:
        return_.append('*')
    else:
        return_.append(s[i])

print("".join(return_))

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
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline



def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [int(input_raw[0])]
    input_raw = read_func().strip().split()
    S = input_raw[0]
    input_raw = read_func().strip().split()
    [K] = [int(input_raw[0])]
    s = S[K - 1]
    new_S = ""
    for i in range(N):
        if S[i] != s:
            new_S += "*"
        else:
            new_S += S[i]
    print new_S


if __name__ == '__main__':
    main()

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

Solution (Python):
"""
python3 a.py < input.txt
"""
import math
import itertools as it
import heapq

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

sk=S[K-1]
O=[]
for i in range(0,N):
    if S[i] == sk:
        O.append(S[i])
    else:
        O.append("*")

print("".join(O))

Solution (Python):
from heapq import heappush,heappop


def int_raw():
    return int(input())

def ss_raw():
    return input().split()

def ints_raw():
    return list(map(int, ss_raw()))


def runLength(in_str):
    kukan = 1
    start = 0
    ret = []
    for i in range(1,len(in_str)):
        if in_str[i-1]!=in_str[i]:
            ret.append([in_str[i-1],kukan,start])
            start = i
            kukan=0
        kukan+=1
    ret.append([in_str[-1],kukan,start])
    return ret

N = int_raw()
S= input()
K = int_raw()

def main():
    ans =""
    for c in S:
        if c==S[K-1]:
            ans+=c
        else:
            ans+="*"
    return ans


print(main())

Solution (Python):

"""
AtCoder B
"""

def main():
    N=input()
    S=list(map(str,input().split()))[0]
    K=int(input())

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

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
S = input()
K = int(input())
temp = S[K-1]
for i in range(n):
    if S[i] != temp:
            S = S[:i]+"*"+S[min(i+1,n):]
print(S)

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

out = ''

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

print(out)

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


ch = S[K-1]

for i in range(N):
    if S[i] != ch and S[i] != '*':
        S =S.replace(S[i],'*')

print(S)

Solution (Python):


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

s = S[K - 1]

import re
ans = re.sub(r'[^{}]'.format(s), '*', S)
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

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

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

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

Solution (Python):


if __name__ == "__main__":
    N = int(input())
    S = input()
    K = int(input())
    target = S[K-1]
    result = ""
    for i in range(len(S)):
        if S[i] != target:
            result += "*"
        else:
            result += S[i]
    print(result)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float('inf')
MOD = 10**9+7
dy = [0,1,0,-1]
dx = [1,0,-1,0]
ddy = [0,1,1,1,0,-1,-1,-1]
ddx = [1,1,0,-1,-1,-1,0,1]

n = int(input())
S = input()
k = int(input())
t = S[k-1]
res = ""
for s in S:
    if s == t:
        res += s
    else:
        res += '*'
print(res[:-1])

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

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

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

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

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

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

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

c = s[k-1]

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

print(''.join(s))

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

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

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

print(ans)

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

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

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

for i in range(n):
    print(t[i], end="")

Solution (Python):
import sys
import math
 
ni = lambda: int(ns())
na = lambda: list(map(int, input().split()))
ns = lambda: input()

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

Solution (Python):

import re

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

c = s[k-1]
out = re.sub('[^{}]'.format(c), "*", s)

print(out)

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

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

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

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

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

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

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

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

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

Solution (Python):


import math






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

l=s[k-1]

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


print(ans)

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

a = S[K-1]

aa = S.split(a)
output = ''
for i in range(len(aa)):
    output += '*' * len(aa[i])+a

print(output[:-1])

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

rep = S[K-1]
ans = ""

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

print(ans)

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

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

Solution (Python):
import sys
import numpy as np

readInt = lambda: int(sys.stdin.readline())
readIntN = lambda: [int(v) for v in sys.stdin.readline().split(' ')]

n = readInt()
s = sys.stdin.readline().strip()
k = readInt()

v = s[k - 1]
ss = list(s)
for i,c  in enumerate(s):
    if c != v:
        ss[i] = '*'
ret = ''.join(ss)
print(ret)

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

Solution (Python):
import sys

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


temp = S[K-1]

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

print(ans)

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


main()

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

Solution (Python):
N = int(input())
S = list(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):
import sys
input = sys.stdin.readline
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())

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

print(''.join(lst))

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

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

print(''.join(ans))

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

t = s[k-1]
s2 = []
for i, c in enumerate(s):
    if c != t:
        s2.append("*")
    else:
        s2.append(c)
print("".join(s2))

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

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

output = ''
target_char = s[k - 1]

for char in s:
    if char == target_char:
        output += char
    else:
        output += '*'

print(output)

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

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

print(ans)

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

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

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

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

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

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

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

Solution (Python):

import copy
import numpy as np
import random
import bisect 
import math


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


ans = ""

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

print(ans)

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

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

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

Solution (Python):
n=int(input())
s=input().rstrip()
s=[i for  i in s]
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())

no_replace_char = S[K-1]

output = ""
for c in S :
    if (c == no_replace_char) :
        output += c
    else :
        output += "*"

print(output)

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

c = s[k-1]
s_d = ""

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

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

p = ""
for i in range(n):
    p = p + s[i]

print(p)

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

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

print(retval)

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

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

s = S[K - 1]

ans = ''

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

print(ans)

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

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

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

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

Solution (Python):
a = int(input())
b = list(input())
c = int(input())
d = b[c-1]

for i in range(a):
    if b[i] == d:
        print(d,end = "")
    else:
        print("*",end = "")

print("")

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

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

Solution (Python):


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

s = S[K-1]

R = "".join([c if c == s else "*" for c in S])

print(R)

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

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

a = S[K-1]

ans = ''.join(['*' if x != a else x for x in S])

print(ans)

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

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

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

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

    mozi = s[k-1]
    
    result = ''
    for c in list(s):
        if c == mozi:
            result += mozi
        else:
            result += '*'
    print(result)
    


main()

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

char = S[K - 1]

for c in S:
    if c == char:
        print(c, end='')
    else:
        print('*', end='')

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):
def MI(): return map(int, input().split())
def II(): return int(input())
def IS(): return input()
def LI(): return list(map(int, input().split()))

n = II()
s = IS()
k = II()
a = []
for i in s:
    if i == s[k-1]:
        a.append(i)
    else:
        a.append('*')
print(''.join(a))

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

a = s[k - 1]

result = [a if s[i] == a else '*' for i in range(n)]
print(''.join(result))

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

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

print(text)

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

Solution (Python):


def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  N = readInts()[0]
  S = input()
  K = readInts()[0]
  ans = ""
  for c in S:
    if c == S[K-1]:
      ans += c
    else:
      ans += "*"
  print(ans)

if __name__ == "__main__":
  main()

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

print(''.join(S))

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

ans = list(S)
c = S[K-1]

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

print(''.join(ans))

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

t = S[K-1]

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

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

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

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

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

target = s[k-1]

ans = ""

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

print(ans)

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

sList = list(S)
notReplace = sList[K-1]

for i in range(len(sList)):
    if sList[i] != notReplace:
        sList[i] = "*"

print("".join(sList))

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

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

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

Solution (Python):
def ns():
    import sys
    return map(int, sys.stdin.readline().split())
  
def ss():
    import sys
    return list(sys.stdin.readline().strip())
  
N, = ns()
S = ss()
K, = ns()

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