input = readlines.map(&:chomp)

length = input[0].to_i
word = input[1]
num = input[2].to_i

char = word[num]

length.times do |i|
  if word[i] == char
    # nothing
  else
    word[i] = "*"
  end
end

print word