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



Sample input:
5
error
2


Sample output:
*rr*r

Submission status: Runtime Error

Solution code:
n, s, k  = input().split()
s_list = list(s)
k = int(k) - 1
answer_list = []
for s in s_list:
    if not s == s_list[k]:
        s = '*'
    answer_list.append(s)
answer_list = ''.join(answer_list)
print(answer_list)

Submission status: Runtime Error

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

tar = S[K-1]

lis = (_ if _==tar else "*" for _ in S]
print("".join(lis))

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
K = int(input())
M = str()
for i in range(N):
    if S[i] != S[K]:
        M= M +"*"
    else:
        M= M +S[i]
print(M)

Submission status: Runtime Error

Solution code:
a = int(input())
b = input()
c = int(input())
d = b[k-1]
new = [e for e in b if e == d]

Submission status: Runtime Error

Solution code:
import re

N=int(input())
S=str(input())
K=int(input())
slice=S[K]
ans=re.sub(r'[^slice]','*',S)
print(ans)

Submission status: Runtime Error

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

char = S[int(K)-1]

#print(char)

ans = []

for j in range(len(S)):
  #print(S[j])
  if char != S[j]:
    #print(S[j])
    S_t =S.replace(S[j], "*")
    #print(S_t)
    #print("!=") 
    S = S_t 
  else:
    #ans.append(char)
    continue

#print(" ".join(ans))
print(S_t)

Submission status: Runtime Error

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

char = s[k]
result = ""
for x in s:
    if x == char:
        result += char
    else:
        result += "*"
print(result)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N=input()
S=input()
K=int(input())
count=0
for s in S:
    if s==S[K]:
        pass
    else:
        S=S[:count] + '*' + S[count+1:]
    count+=1
print(S)

Submission status: Runtime Error

Solution code:
def third_select(S):
    right = N - 1
    change = 0
    sharp_appeared = False
    for i, s in enumerate(S[::-1]):
        if s == '#':
            sharp_appeared = True
        elif sharp_appeared:
            right = N - i
            break
        else:
            change += 1

    for s in S[:right]:
        if s == '#':
            change += 1

    for i,s in enumerate(S):
        if s == '#':
            left = i
            break

    return min(change, S[left:].count('.'))

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

ALL_period = S.count('#')
ALL_sharp = N - ALL_period



print(min(ALL_period, ALL_sharp, third_select(S)))

Submission status: Runtime Error

Solution code:
import sys

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

SS = []

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

Submission status: Runtime Error

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

s =list(s)

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

print(''.join(s))

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
K = int(input())
list = []
Sk = S[K-1]
for i range(0,N):
  s = S[i]
  s_ans = Sk if s == Sk else "*"
  list.append(s_ans)
ans = join(list)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
k = int(input())
s_list = list(s) 
for i in range(0 , n) :
    if s_list[i] == s_list[k] :
        s_list[i] = "*"
a = "".join(s_list)
print(a)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
s = input()
k = int(input())

selected = s[k]
print(''.join(['*' if l != selected else l for l in s ]))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=input()
S=str(input())
K=int(input())
Target=S[K]
Ans=""
for i in range(0,len(S),1):
  if S[i]==S[K]:
    Ans+=str(S[i])
  elif S[i]!=S[K]:
    Ans+="*"

print(Ans)

Submission status: Runtime Error

Solution code:
import numpy as np

N, S, K = map(int, input().split())

target = S[K-1]

for i in range(N):
	if S[i]==target:
		arr+=target
	else:
		arr+=('*')

print(arr)

Submission status: Runtime Error

Solution code:
K = int(input())
target = S[K-1]
result = []
result2 = ''
for i in S:
    if i is target:
        result.append(i)
    else:
        result.append('*')
for i in result:
    result2 += i

print(result2)

Submission status: Runtime Error

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

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

print(S)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input('')
k = int(input())
a = s[k - 1]
b =s.translate('*',^a)
print(b)

Submission status: Runtime Error

Solution code:
N=int(input())
S=list(input())
K=int(input())
word=S[K]
for i in range(len(S)):
    if S[i]!=word:
        S[i]='*'
print(''.join(S))

Submission status: Runtime Error

Solution code:
n=int(input())
s=list(input())
k=int(input())
p=s[k]
q=[0]*n
for i in range(n):
  if s[i]!=p:
    s[i]='*'
      
print(''.join(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

c = s[k]
a = ""
for t in list(s):
 if t == c:
  a += c
 else:
  a += "*"
print(a)

Submission status: Runtime Error

Solution code:
N=input()
S=input()
K=input()
slice=S[K-1]
print(S.replace(slice, '*'))

Submission status: Runtime Error

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

chk = s[k]
for i in range(len(s)):
	if(s[i] != chk):
		s[i] = "*"
print("".join(s))

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input())
k = int(input())
 
a = []
 
for i in range(n):
  if s[i] == s[k]:
    a.append(s[k])
  else:
    a.append("*")
 
print(a)

Submission status: Runtime Error

Solution code:
import numpy as np

N=int(input())
S=str(input())
K=int(input())
target = S[K]
arr = ''

for i in range(N):
	if S[i]==target:
		arr+=target
	else:
		arr+=('*')

print(arr)

Submission status: Runtime Error

Solution code:
N = int(input())
S = str(input())
K = int(input())
H = ""
for i in range(N):
  if(SS[i]==SS[K-1]):
    H+=SS[i]
  else:
    H+="*"
print(H)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
K=int(input())
tmp=S[K-1]
out=[]
for i in range(N):
    if S[i]!=tmp:
        out.append("*")
    else:
        out.append(S[i])
ttt=""
for i in out:
    ttt="{}{}".format(ttt,i)
print(ttt)
N=input()
N=int(input())

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=input()
S=input()
K=int(input())
count=0
for s in S:
    if s==S[k]:
        pass
    else:
        S=S[:count] + '*' + S[count+1:]
    count+=1
print(S)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
A,B,C=map(int,input().split())

if A<B:
    if A<C<B:
        print("Yes")
    else:
        print("No")
else:
    if B<C<A:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
N = int(raw_input())
S = list(raw_input())


hoge = S[K-1]

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

print("".join(S))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=input()
S=input()
K=input()
tmp=S[K-1]
out=[]
for i in range(N):
    if S[i]!=tmp:
        out.append("*")
    else:
        out.append(S[i])
ttt=""
for i in out:
    ttt="{}{}".format(ttt,i)
print(ttt)

Submission status: Runtime Error

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

key = S[K-1]

for i in renge(len(S)):
    if not S[i] == key:
        S[i] = '*'

print(''.join(S))

Submission status: Runtime Error

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

a = []

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

print(a)

Submission status: Runtime Error

Solution code:
#!/usr/bin/python
# coding: UTF-8

import re

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
def eee(s,k):
    a = s[k]
    for i in range(len(s)):
        if s[i]!=a:
            s[i] = '*'            
    return ''.join(s)

n = int(input())
s = list(input())
k = int(input())
print(eee(s,k))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/python
# coding: UTF-8


len = int(input())
src = input()
t = int(input())
pt = src[t]
print(src.replace(pt,"*"))

Submission status: Runtime Error

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

target = S[K]
S = list(S)

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

Submission status: Runtime Error

Solution code:
N=int(input())
ls_S=list(input())
K=int(input())

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

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
K=int(input())
s=S[K]

X=[]*N

for i in S:

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

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

Submission status: Runtime Error

Solution code:
n,s,k = map(str, input().split('\n'))
n = int(n)
k = int(k)
char = s[k-1]
ans=''
for i in s:
    if i!=char:
        ans+='*'
    else:
        ans+=char
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
S = str(input())
K = int(input())
#rint(N,S,K)

WRITE = list(S)
CHARA = S[K]
#print(CHARA)

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

print(S)

Submission status: Runtime Error

Solution code:
n = input()
word = input()
a= input()
b=0
x=word[int(a)]

for i in range(int(n)):
    if word[i] == x:
         b=0
    else:
        word[i]=*
print(word)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
k = int(input())
s_list = list(s)
for j in range (len(s_list)):
       if s_list[j] != s_list[k]:
              s_list[j] = "*"
ans = "".join(s_list)
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
s=list(input())
k=int(input())
tmp=s[k]
for i in range(n):
  print(s[i],end="") if s[i]==tmp else print("*",end="")
print("")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:

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

print(S[K])

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

S = "".join(S)

print(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print("".join(result))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

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

word = s[k]
for i in s:
    if i != word:
        sys.stdout.write('*')
    else:
        sys.stdout.write(i)

Submission status: Runtime Error

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

print(c)

Submission status: Runtime Error

Solution code:
x = int(input())
str = list(input())
y = int(input())

for i in range(x):
    if(str[i] != str[y]):
        str[i] = "*"

print(str)

Submission status: Runtime Error

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

SK = str(S[K])
for i in range(0,N):
    if S[i] == SK:
        pass
    else:
        S[i] = '*'
print(S, end="")

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
K = int(input())
ab = "abcdefghijklmnopqrstuvwxyz".replace(S[K],"")
for i in ab:
  S = S.replace(i,"*")
print(S)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
k = int(input())
l = []

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)

Submission status: Runtime Error

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

for l in s:
  if l != s[k]:
    l = "*"
  ans += l
print(ans)

Submission status: Runtime Error

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

SK = str(S[K])
for i in range(0,N):
    if S[i] == SK:
        pass
    else:
        S[i] = '*'
print(*S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

key = S[K]
result = 'a'

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

print(result[1:])

Submission status: Runtime Error

Solution code:
n = input()
s = str(input())
k = input()

char = s[k]
result = ""
for x in s:
    if x == char:
        result += char
    else:
        result += "*"
print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

t = s.replace(s[k],"*")
    
print(t)

Submission status: Runtime Error

Solution code:
n=int(input())
s=list(input())
k=int(input())
ans=''
for i in range(n):
    if s[i]==s[k]:
        ans+=s[i]
    else:
        ans+='*'
print(ans)

Submission status: Runtime Error

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

target = S[K]
S = list(S)

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

Submission status: Runtime Error

Solution code:
import re
inp = input().split()
print(re.sub("[^" + str(inp[1][int(inp[2]) - 1]) + "]", "*", inp[1]))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding utf-8 -*-
N = int(input())
S = input()
K = int(input())

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

Submission status: Runtime Error

Solution code:
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()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
9
education
7

Submission status: Runtime Error

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

K_lett = S[K]

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

print("".join(S_list))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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


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

Submission status: Runtime Error

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

s = S[K]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

x = str(S[K+1])
T=S.replace(x,'*',N)
print(T)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

moji = S[K-1]

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
s=input()
k=s[int(input())]
a=""
for i in range(n):
    a+=["*",k][int(s[i]==k)]
print(a)

Submission status: Runtime Error

Solution code:
import copy 

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

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

Submission status: Runtime Error

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

c = S[K]

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

sk = s[k-1]

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

print(s)

Submission status: Runtime Error

Solution code:
r=int(input())
s=list(input())
t=int(input())
i=0
for i in range(r):
    if s[i]!=s[t]:
        s[i]=s[t]
          
print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

a = S[K]

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

print(''.join(S))

Submission status: Runtime Error

Solution code:
N = int(input())
S = str(input())
K = int(input())
SS = list(S)
for i in range(N):
  if(SS[i]==SS[K]):
    None
  else:
    SS[i] = "*"
SSS = str(SS)
print(SSS)

Submission status: Runtime Error

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

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

print("".join(S))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
K=int(input())
cnt=0
for i in range(N):
    if S[i]!=S[K]:
        cnt+=1
print(cnt)

Submission status: Runtime Error

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

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

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

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    B()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = int(input())
s = input()
i = int(input())

si = s[i]

s = s.replace('si', '*')
print(s)

Submission status: Runtime Error

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

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

print(''.join(S))

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())

if (a < b and b < c) or (a > b and b > c):
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
K = int(input())
T = ""
for s in S:
  if s == S[K]:
    T += s
  else:
    T += "*"
print(T)

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long ll;
int main(){
    int n,k;
    string s;
    cin >> n >> s >> k;
    rep(i,n){
        if(s[i] != s[k-1]){
            cout << '*';
        }
        else{
            cout << s[i];
        }
    }
    cout << endl;
}

Submission status: Runtime Error

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

char = S[K]

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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


N = int(input())
S = input()
for i in range(N):

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

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

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

print(''.join(S))

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
K = int(input())
a = S[K]
for i in range(N):
    if S[i] != a:
        S[i] = "*"
print(S)

Submission status: Runtime Error

Solution code:
import re

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

print(re.sub(f'[^{S[K-1]}]', '*', S))