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())
t = list(s)
u = ""
for i in range(n):
    if t[i]!=t[k-1]:
        t[i]="*"
for j in range(n):
    u = u+t[j]
print(u)

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

print(output)

Solution (Python):


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

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

ans = "".join(temp)

print(ans)

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

hoge = S[K-1]

for i in range(N):

      if S[i] != hoge:
            S[i] = "*"

print("".join(S))

Solution (Python):




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

if __name__ == '__main__':
	import sys
	sys.exit(main())

Solution (Python):
import sys


N = raw_input().strip()
S = raw_input().strip()
K = int(raw_input().strip())
A = []
ans = ''
for s in S:
    if s!=S[K-1]:
        A += '*'
    else:
        A += s
        
for x in A:
    ans += x
print(ans)

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

sk = S[K-1]
out = ''

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

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    s = input().rstrip()
    k = int(input())
    print("".join([c if c == s[k - 1] else "*" for c in s]))


if __name__ == "__main__":
    main()

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

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

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

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

for x in s:
    if x != s[k-1]:
        result.append("*")
    else:
        result.append(x)

print("".join(result))

Solution (Python):
N, S, K = [input() for i in range(3)]

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

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

temp = s[k-1]
ans = s.replace(temp, '0')

for i in ans:
    if i != '0':
        ans = ans.replace(i, '*')

print(ans.replace('0',temp))

Solution (Python):
A = int(input())
B = input()
C = int(input())
mark = B[C-1]
for i in range(A):
  if B[i] != mark:
    B = B.replace(B[i], '*', 1)
    
 
print(B)

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

change_word = S[K-1]
changed_S = ''

for w in S:
    if(w == change_word):
        changed_S += w
    else:
        changed_S += '*'

print(changed_S)

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

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

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

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

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

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

print(T)

Solution (Python):

n = int(raw_input())
s = str(raw_input())
k = int(raw_input())

c = (list(s))[k-1]

def sub(x):
    global c
    if x != c:
        return "*"
    else:
        return x

ans = "".join(map(sub, s.strip()))

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] = "*"
ans =""
for j in s:
    ans += j
print(ans)

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

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

print(''.join(ans))

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

    return n, s, k



if __name__ == '__main__':
    n, s, k = read_input()

    target_char = s[k - 1]

    result = ''
    for c in s:
        if c != target_char:
            result += '*'
        else:
            result += c

    print(result)

Solution (Python):



import re

len = int(input())
src = input()
t = int(input())
pt = "[^"+src[t-1]+"]"
print(re.sub(pt,"*",src))

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

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

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

Solution (Python):
_, e, f = [input() for _ in range(3)]

print("".join([char if char == e[int(f)-1] else "*" for char in e]))

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

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

if s[0]==ans:
    atai=s[0]
else:
    atai='*'
for i in range(1,n):
    if s[i]==ans:
        atai=atai+s[i]
    else:
        atai=atai+'*'

print(atai)

Solution (Python):
A =int(input())
B=input()
c=int(input())
d=B[c-1]
E=""
for i in range(A):
    if B[i]==d:
        E=E+d
    else:
        E=E+"*"
print(E)

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

Solution (Python):
import sys

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

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

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

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

key = S[K-1]
stk = ""
for i in S:
    if(i == key):
        stk += i
    else:
        stk += '*'
print(stk)

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

s = S[K-1]

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

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

Solution (Python):
num=int(input())
origin=input()
per=origin[int(input())-1]

for i in range(num):
    if origin[i] != per and origin[i] != "*":
        origin = origin.replace(origin[i], "*")
        
print(origin)

Solution (Python):
inp =input()
li = list(input())
num = int(input())
key = li[num-1]
a = []
for q in li:
    if q != key:
        a.append('*')
    else:
        a.append(q)
x = ''.join(a)
print(x)

Solution (Python):
import re

_ = int(input())
s = input()
k = int(input())

k_char = s[k-1]
print(re.sub('[a-z]', '*', s.replace(k_char, '-')).replace('-', k_char))

Solution (Python):
n = int(input())
s = input()
k = int(input())
sa = s[k - 1: k]
sl = len(s)
sli = list(s)
hey = []
for sli in sli:
    if sli == sa:
        hey.append(sli)
    else:
        hey.append("*")
hey = "".join(hey)
print(hey)

Solution (Python):
gomi = input()
a = input()
b = int(input())
c = []
for i in range(len(a)):
    if a[b-1] == a[i]:
        c.append(a[i])
    else:
        c.append("*")

print(''.join(c))

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

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

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

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

print "".join(s)

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

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

key = S[K - 1]
result = 'a'

for i in range(N):
    if S[i] == key:
        result += S[i]
    elif S[i] != key:
        result += '*'
        

print(result[1:])

Solution (Python):
N=int(input())
S=str(input())
n=int(input())
d=S[n-1]
a=""
for i in S:
    if i!=d:
        a+="*"
    elif i==d:
        a+=i
print(a)

Solution (Python):



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

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

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

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

print(''.join(s))

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

x = s[k-1]

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

print(s)

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

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

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

Solution (Python):
import re

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

T = S[K-1:K]

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

Solution (Python):



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

a = ''

for i in range(len(S)):
    if S[i] == S[K]:
        a += S[i]
    else:
        a += '*'

print(a)

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

s = S[K-1]
S_ = ''
for i,n in enumerate(S):
    if n==s:
        S_+=S[i]
    else:
        S_+='*'
print(S_)

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

Solution (Python):

"""
Created on Sat Apr 20 20:18:25 2019

@author: screamLab
"""

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

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

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

X=[]*N

for i in S:

    if i==s:
        X.append(i)
    else:
        X.append("*")

Y="".join(X)
print(Y)

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

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

Solution (Python):
argN = int(input())
argS = input()
argK = int(input())

aryS = list(argS)

for i in range(argN):
  if aryS[i] == aryS[argK-1]:
    pass
  else:
    aryS[i] = "*"
print("".join(aryS))

Solution (Python):

n = int(input())
s = str(input())
k = int(input())
"""
n = 7
s = "djfsfok"
k = 3
"""
index_num = [n for n, v in enumerate(s) if v == s[k-1]]
ans = list("*"*n)
index_num = list(index_num)
for i in range(0, len(index_num)):
    ans[index_num[i]] = s[k-1]
print("".join(ans))

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

Solution (Python):
input1 = input()
input2 = list(input())
input3 = input()
for i in range(0,len(input2)):
    if input2[i] != input2[int(input3)-1]:
        input2[i] = "*"
print("".join(input2))

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

w = S[K-1]
print(re.sub("[^

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

moji = S[K-1]

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

print(S)

Solution (Python):
from sys import stdin
import re

n = [int(x) for x in stdin.readline().rstrip().split()]
s = stdin.readline().rstrip().split()
s = s[0]
k = [int(x) for x in stdin.readline().rstrip().split()]
k = k[0]

ast = ''
for i in range(len(s)):
    if i+1 == k:
        ast = s[i]

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

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

Solution (Python):
N=int(input())
S=list(input())
Kkari=int(input())
K=Kkari-1
t=0
while t<N:
    if S[t]!=S[K]:
        S[t]='*'
    t=t+1
print(''.join(S))

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

ch = s[k - 1]

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

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

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

S = "".join(S)

print(S)

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

str_list = list(str)
for i in range(n):
    if str_list[i] != str_list[k - 1]:
        str_list[i] = '*'

str_changed = "".join(str_list)
print(str_changed)

Solution (Python):




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

char = S[K - 1]


ret = ''

for i in range(len(S)):
    if S[i] != char:
        ret += '*'
    else:
        ret += S[i]

print(ret)

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

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())
s = S[k-1]

A = []
for i in range(n):
    a = S[i]
    if a != s:
        A.append("*")
    else:
        A.append(s)

print(*A, sep = "")

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

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

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

    print(''.join(S))


if __name__ == '__main__':
    main()

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

target_cha = s[k - 1]

ans = ""
for c in s:
    if not c == target_cha:
        ans += "*"
    else:
        ans += c

print(ans)

Solution (Python):
from sys import stdin
from re import sub

readline = stdin.readline

_ = readline()
s = readline().rstrip()
k = int(readline())

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

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

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

T = ''.join(S)

print(T)

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

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

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

ans = ','.join(ans)
ans = ans.replace(',', '')

print(ans)

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

a = S[K-1]

answer = ''
for i,j in enumerate(S):
  if j == a:
    answer += j
  else:
    answer += '*'

print(answer)

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

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

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

list2 = []
for j in list1:
    if j == list1[K-1]:
        list2.append(list1[K-1])
    else:
        list2.append("*")


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

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

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

print(''.join(S))

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

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

print(c)

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

str_list = list(S)

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

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

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

s=input()

k=input()
k=int(k)

tmp = s[k-1]
tmp_list=list(s)

for i in range(len(s)):
	if s[i]!=tmp:
		tmp_list[i]="*"

aaa = "".join(tmp_list)
print(aaa)

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

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

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

S_list = list(S)

moji = S_list[K-1]

for i in range(len(S_list)):
    if S_list[i]!=moji:
        S_list[i]="*"
print("".join(S_list))

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

ch = S[K-1]

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

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

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

Solution (Python):

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

t = S[K - 1]
for s in 'abcdefghijklmnopqrstuvwxyz':
    if s != t:
        S = S.replace(s, '*')
        
print(S)

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

c = S[K-1]

print("".join([v if v == c else "*" for v in S]))

Solution (Python):


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

k_chr = S[K-1]
output = ''

for char in S:
    if char == k_chr:
        output += k_chr
    else:
        output += '*'

print (output)

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

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

print(ans)

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 = []

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

print(''.join(ans))

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

Solution (Python):
import re
N = input()
S = input().strip()
K = int(input())
print(re.sub("[^" + str(S[K - 1]) + "]", "*", S))

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

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

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

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

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

for i in range(n):
    a += ''.join(l[i])
    
print(a)

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

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

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

mojiretu = ' '

for x in ans:
    mojiretu += x
    
print(mojiretu)

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

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

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

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

a = s[k-1]

s_list = list(s)

for i in range(n):
    if s_list[i] != a:
        s_list[i] = "*"

s1 = "".join(s_list)

print(s1)

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

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

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

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

    target_char = S[K - 1]
    result_list = []

    for s in S:
        if target_char != s:
            result_list.append("*")
        else:
            result_list.append(s)

    print("".join(result_list))


if __name__ == '__main__':
    main()

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

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

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

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

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

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

rep = s[k-1]
s = [x if x == rep else "*" for x in s]

print("".join(s))

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

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

print(new_s)

Solution (Python):


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

t = s[k-1]

s_list = list(s)

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

s_changed = "".join(s_list)
print(s_changed)

Solution (Python):


len_of_s = int(input())
s = input()
k = int(input())

remain = s[k-1]
s_list = [i for i in s]

for i in range(len_of_s):
	if s_list[i] != remain:
		s_list[i] = "*"

result = "".join(s_list)
print(result)

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

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

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

x=s[K-1]

for i in range(N):
    if s[i]!=x:
        s[i]="*"

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

Solution (Python):

import re

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

save = []

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

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

Solution (Python):
def main(word, num):
    strs = list(word)
    target = strs[num-1]

    new_strs = []
    for s in strs:
        if s != target:
            s = "*"
        new_strs.append(s)

    return ''.join(new_strs)


if __name__ == "__main__":
    input()
    word = input()
    num = int(input())
    print(main(word, num))

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

k_char = S[K-1]
S_aranged = ""

for i in S:
    if i != k_char:
        S_aranged += "*"
    else:
        S_aranged += k_char

print(S_aranged)

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

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

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

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

Solution (Python):
import sys

def main():
    N = int(input())
    text = input()
    K = int(input())
    textK = text[K-1]
    ans = ''
    for t in text:
        if t!=textK:
            ans += '*'
        else:
            ans += t
    print(ans)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
import re

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

listS = list(S)
result = re.sub('[^'+listS[K-1]+']', '*', S)
print(result)

Solution (Python):
jhj = int(input())
moji = list(input())
k = int(input())
o = moji[k - 1]
for c in range(jhj):
    if moji[c] == o:
        pass
    else:
        moji[c] = "*"
print("".join(moji))

Solution (Python):


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

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

print(ans)

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

i = K -1
char = S[i]
line = ""

for ii in range(len(S)):
    if char != S[ii]:
        line = line + "*"
    else:
        line = line + S[ii]


print(line)

Solution (Python):
N = int(input())
S = input()
K = int(input())
r = S[K-1]
print(''.join(list(map(lambda x: '*' if x!=r else r,S))))

Solution (Python):
x = int(input());
li = list(input());
y = int(input());

for i in range(len(li)):
    if str(li[i]) != str(li[y-1]):
        li[i] = '*';
for i in range(len(li)):
      print(li[i], end="");

print();

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

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

Solution (Python):

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

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

Solution (Python):
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from math import ceil, floor
from sys import setrecursionlimit

import heapq
import itertools
import operator



inf = float('inf')
N = 0
S = ""
K = 0


def set_inputs():
    global N, S, K
    N = get_int()
    S = get_str()
    K = get_int()
    return


def main():
    setrecursionlimit(100000)
    set_inputs()
    
    ans = []
    C = S[K - 1]
    for c in S:
        if c != C:
            ans.append("*")
        else:
            ans.append(c)
    print("".join(ans))
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def get_data(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    main()

Solution (Python):
import copy 

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

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

Solution (Python):
from sys import stdin
n = int(stdin.readline().rstrip())
S = list(stdin.readline().rstrip())
k = int(stdin.readline().rstrip())
c = S[k-1]
for i, s in enumerate(S):
    if s != c:
        S[i]='*'
print(''.join(S))

Solution (Python):
al = {"a":"*","b":"*","c":"*","d":"*","e":"*","f":"*","g":"*","h":"*","i":"","j":"*","k":"*","l":"*","m":"*","n":"*","o":"*","p":"*","q":"*","r":"*","s":"*","t":"*","u":"*","v":"*","w":"*","x":"*","y":"*","z":"*"}
N = int(input())
S = input()
K = int(input())
del al[S[K-1]]
print(S.translate(str.maketrans(al)))

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

letter = s[k-1]
out = ''

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

print(out)

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

target = S[K-1]
result = ""

for i in S:
    if i == target:
        result += i
    else:
        result += "*"

print(result)

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


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

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

Solution (Python):
N = int(input())
s = input()
S = [str(c) for c in s]
K = int(input())

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

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

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

for i in range(N):
    if list_S[i] != s:
        list_S[i] = '*'

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

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

a = S[K - 1]

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

Solution (Python):
N = int(input())
S = input()
K = int(input())
k_string = S[K-1:K]
i_string = 0
for i in range(N):
    i_string = S[i:i+1]
    if i_string != k_string:
        S = S.replace(i_string, "*")

print(S)