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

Solution code:
n = int(input())
s = input()
k = int(input())
a = s[k-1]
print("".join([a if s_ == a else "*" for s_ in s]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=input()
K=int(input())
c=S[K-1]
ans=list('*'*N)
for i in range(N):
    if S[i]==c:
        ans[i]=c
print(''.join(ans))

Submission status: Accepted

Solution code:
n = int(input())  # 数値入力
str = list(input())  # 一文字ずつ格納
k = int(input())
k -= 1
ans = ""

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

print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

c = s[k-1]

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

Submission status: Accepted

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

e = s[k - 1]

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

print("".join(s))

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
a = int(input())
inde = s[a-1]

ans = ""

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
k = int(input())
ans = ''
m = s[k-1]
for ss in s:
  if ss == m:
    ans += ss
  else:
    ans += '*'
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
S = input()
K = int(input())
char = S[K-1]
ans = ''

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

print(ans)

Submission status: Accepted

Solution code:
def solve():
  n = int(input())
  s = input()
  k = int(input())
  ans = ""
  place = s[k-1]
  #print(place)
  for i in s:
    if i != place:
      ans += '*'
    else:
      ans += place
  print(ans)
solve()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N=INT()
S=input()
K=INT()

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

Submission status: Accepted

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

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

print('.'.join(S).replace('.',''))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

let = s[k-1]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re

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

print(re.sub("[^" + S[K-1] + "]", '*', S))

Submission status: Accepted

Solution code:
n=int(input())
s=input()
k=s[int(input())-1]
p=[]
for i in s:
    if i!=k:p.append("*")
    else:p.append(k)
print("".join(p))

Submission status: Accepted

Solution code:

def kari():
    N = list(map(int, input().split()))
    A, B = map(int, input().split())

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

    aaa = S[K - 1]

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



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def gcd_core(a, b):
    if b == 0:
        return a
    else:
        return gcd_core(b, a % b)


def gcd(arr):
    g = gcd_core(arr[0], arr[1])
    for i in range(2, len(arr)):
        g = gcd_core(g, arr[i])
    return g

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c = S[K - 1]

result = "".join(x if x == c else "*" for x in S )

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
from operator import itemgetter
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
s = S()
K = I()

tmp = s[K-1]

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://tenka1-2019-beginner.contest.atcoder.jp/tasks/tenka1_2019_b

import itertools
from collections import Counter
import bisect

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

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

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

Submission status: Accepted

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

target = S[K-1]

res = ''
for s in S:
    if s != target:
        res += '*'
    else:
        res += s
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

Solution code:
def main():
    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))
    return 0

main()

Submission status: Accepted

Solution code:
n = int(input())
s = input()
k = int(input())
a = s[k-1]
ans = ''
for b in s:
    if b == a:
        ans += b
    else:
        ans += '*'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(N: int, S: str, K: int):
    kth = S[K-1]
    s = list(S)
    for i in range(N):
        if s[i] != kth:
            s[i] = "*"
    print("".join(s))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    K = int(next(tokens))  # type: int
    solve(N, S, K)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

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

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

    for moji in S:
        if moji == t:
            ans += moji
        else:
            ans += "*"
    print(ans)

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    S = str(input().strip())
    K = int(input())

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

    return ans


if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
import collections
from operator import itemgetter
#以下てんぷら
def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
n = ip()                                     #入力整数1つ
#a,b,c= (int(i) for i in input().split())       #入力整数横2つ以上
#a = [int(i) for i in input().split()]        #入力整数配列
a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
k = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(3)]    #入力セット(整数改行あり)(2/2)
#jの変数はしようできないので注意
#全足しにsum変数使用はsum関数使用できないので注意
#こっから本文
k-=1
b = []
for i in range(n):
    if a[i] == a[k]:
        b.append(a[k])
    else: b.append('*')
print(''.join(b))

Submission status: Accepted

Solution code:
from sys import stdin
N = int(input())
S = input()
K = int(input())
ans= ""
for e in S:
    if e == S[K-1]:
        ans += e
    else:
        ans += "*"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())
nsl = lambda: map(str, sys.stdin.readline().split())

n = ni()
s = list(ns())
k = ni()
a = s[k - 1]
for i in range(len(s)):
    if s[i] != a:
        s[i] = '*'
print(''.join(s))

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
K = int(input())
t = S[K-1]
ans = ''
for s in S:
    ans += '*' if s!=t else s

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

target = S[K - 1]

res = ""
for s in S:
    if s != target:
        res += "*"
    else:
        res += target
print(res)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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))

Submission status: Accepted

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

index=0
while index < len(listS):
    if listS[index]!=listS[k-1]:
        listS[index]="*"
    index+=1

print("".join(listS))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read() for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N = read_a_int()
S = input()
K = read_a_int()

target = S[K-1]

ans = []
for i in range(N):
    if S[i] != target:
        ans.append('*')
    else:
        ans.append(target)

print(*ans, sep="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
k = int(input())
si = s[k-1]
for i in range(n):
    if s[i] != si:
        s[i] = '*'
str_s = ''
for i in range(n):
  str_s += s[i]
print(str_s)

Submission status: Accepted

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

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

Submission status: Accepted

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

target = S[K-1]

a = ''
for c in S:
    if c != target:
        a += '*'
    else:
        a += c
print(a)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

n=int(input())
s=input()
k=int(input())
'''
#a,b=map(int,input().split())
a=[int(i) in range(n)]
a=[0]*n
for i in range(n):
    a.append(int(i))
'''

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

Submission status: Accepted

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

ans = ""

ch = s[k-1]

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
# gcd
# from fractions import gcd
# 切り上げ，切り捨て
# from math import ceil, floor
# リストの真のコピー（変更が伝播しない）
# from copy import deepcopy
# 累積和。list(accumulate(A))としてAの累積和
# from itertools import accumulate
# l = ['a', 'b', 'b', 'c', 'b', 'a', 'c', 'c', 'b', 'c', 'b', 'a']
# S = Counter(l)  # カウンタークラスが作られる。S=Counter({'b': 5, 'c': 4, 'a': 3})
# print(S.most_common(2))  # [('b', 5), ('c', 4)]
# print(S.keys())  # dict_keys(['a', 'b', 'c'])
# print(S.values())  # dict_values([3, 5, 4])
# print(S.items())  # dict_items([('a', 3), ('b', 5), ('c', 4)])
# from collections import Counter
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
# template


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

print(''.join(S))

Submission status: Accepted

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

Submission status: Accepted

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

s = S[K - 1]

ans = ''

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

print(ans)

Submission status: Accepted

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

k = S[K-1]

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

print(ans)

Submission status: Accepted

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

Submission status: Runtime Error

Solution code:
N = int(input())
S = list(input())
K = int(input())
for i in S:
  if s[i - 1] != s[k]:
    s[i - i] = "*"
print(S)

Submission status: Runtime Error

Solution code:
s = input()
k = int(input())
print(s.replace(s[k-1],'*'))

Submission status: Runtime Error

Solution code:
input()
n = int(input())
s = input()
print(s.replace(s[n-1],'*'))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input())
k = int(input())
wordn = ""
w = s[k-1]
for i in s:
    if w != i:
        word += "*"
    else:
        word += w
print(word)

Submission status: Runtime Error

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

print(S.translate(str.maketrans(S[K], "*")))

Submission status: Runtime Error

Solution code:
x = int(input())
y = input()
z = int(input())
for i in range(len(y)+1):
  if y[i] == y[x-1]:
    replace("y[i]","*")
print(y)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

a = []
for i in s:
    
    if i != s[k]:
        a.append('*')
    else:
        a.append(i)

print(*[i for i in a],sep='')

Submission status: Runtime Error

Solution code:

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

a = []
for i in s:
    
    if i != s[k]:
        a.append('*')
    else:
        a.append(i)

print(*[i for i in a],sep='')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
s = input()
i = input()
 
l = []
for i, c in enumerate(s):
  l.append(* if c != s[i-1] else c)
    
''.join(l)
 
print(l)

Submission status: Runtime Error

Solution code:
n = input()
s = input()
i = input()

l = list(s)
for i, c in enumerate(l):
  if c != s[i-1]:
    l[i] = *
    
''.join(l)

print(l)

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:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N = I()
    S = SS()
    K = I()

    ans = ''
    S_k = S[K]
    for i in S:
        if i == S_k:
            ans += i
        else:
            ans += '*'

    print(ans)

if __name__ == '__main__':
    resolve()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
num = int(input())
lst = [i if i==s[num] else "*" for i in s]
print(*lst, sep='')

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
K = input()
t = S[K-1]
ans = ''
for s in S:
  if s == t:
    ans += s
  else:
    ans += '*'

print(ans)

Submission status: Runtime Error

Solution code:
input()
S = input()
K = int(input())
for s in S:(s if s == S[k-1] else *, end="")

Submission status: Runtime Error

Solution code:
def f06():
    n=int(input())
    s=input()
    k=int(input())
    x=s[k-1]
    for i in range(n):
        if s[i]!=x:
            s[i]='*'
    print(s)
f06()

Submission status: Runtime Error

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

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
S = str(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()
l = int(input())
A = str(S[l-1])
for i in range(n):
  if S[i] != A:
    S[i] = '*'
print(S)

Submission status: Runtime Error

Solution code:
n = int(input())
S = input()
l = int(input())
A = S[l+1]
for i in range(n):
  if S[i] != A:
    S[i] = '*'
print(S)

Submission status: Runtime Error

Solution code:
n = int(input())
S = input()
l = int(input())
A = S[l+1]
for i in range(n):
  if S[i] != A:
    S[i] = A
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]:
        print(s[i],end="")
    else:
        print("*",end="")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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[:i] + '*' + S[(i+1):]
print(S)

Submission status: Runtime Error

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

a = s[k-1]

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

print("".join(s))

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>

using namespace std;
using ll = long long int;
#define vll vector<ll>

#define FOR(i, b, e) for(int i = (b); i < (e); ++i)
#define REP(i, e) FOR(i, 0, e)
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define REV(v) reverse((v).begin(), (v).end())
#define IN(v) cin >> (v);
#define VIN(v, n) REP(i, n) cin >> v[i];
#define OUT(v) cout << (v) << endl;
#define YN(b) OUT((b) ? "YES" : "NO")
#define Yn(b) OUT((b) ? "Yes" : "No")
#define yn(b) OUT((b) ? "yes" : "no")

const ll MOD = 1000000007;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n, k;
  string s;
  cin >> n >> s >> k;
  REP(i, n) {
    if (s[i] != s[k - 1]) s[i] = '*';
  }
  OUT(s);

  return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from re import sub

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

print(sub(f'[^{s[k-1]}]', '*', 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("".jpin(s))

Submission status: Runtime Error

Solution code:
input()
S=input()
k=int(input())
for s in S:print(s if s == S[k+1] else '*',end='')

Submission status: Runtime Error

Solution code:
input()
s=input()
k=int(input())
for i in s:print(s if s[i] == s[k+1] else '*',end='')

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
k = int(input())
for i in range(len(s)):
  if s[i] != s[k-1]:
    s[i] = "*"
print(s)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
k = int(input())
for i in range(len(s))
	if s[i] != s[k-1]
  		s[i] = "*"
print(s)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
k = int(input())
for i in range(length(s))
	if s[i] != s[k-1]
  		s[i] = "*"
print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
k = int(input())
for i in range(length(s))
	if s[i] != s[k]
  		s[i] = *

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
S=list(input())
ks=S[int(input())+1]
for i in range(N):
  if S[i]!=ks:
    S[i]='*'
print(ks)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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