#! /usr/bin/env ruby

n = gets.chomp.to_i
s = gets.chomp
k = gets.chomp.to_i

a = s[k-1]


result = ""

n



s.chars.each do |i|
  if(s[i] == a)
    result += a
  else
    result += "*"
  end
end
 
puts result

