atcoder#ABC290B. [ABC290B] Qual B

[ABC290B] Qual B

Score : 200200 points

Problem Statement

There were NN contestants in the qualification round of a programming contest. All contestants got distinct ranks. You are given a length-NN string SS, which represents whether the contestants want to participate in the final round or not. Specifically,

  • if the ii-th character of SS is o, the contestant ranked ii-th in the qualification wants to participate in the final;
  • if the ii-th character of SS is x, the contestant ranked ii-th in the qualification does not want to participate in the final.

Among those who want to participate in the final, KK contestants with the smallest ranks advance to the final.

Print a string TT of length NN that satisfies the following conditions:

  • if the contestant ranked ii-th in the qualification advances to the final, the ii-th character of TT is o;
  • if the contestant ranked ii-th in the qualification does not advance to the final, the ii-th character of TT is x.

Constraints

  • NN and KK are integers.
  • 1KN1001 \le K \le N \le 100
  • SS is a string of length NN consisting of o and x.
  • SS has at least KK o's.

Input

The input is given from Standard Input in the following format:

NN KK

SS

Output

Print the answer.

10 3
oxxoxooxox
oxxoxoxxxx

In this input, N=10N=10 people took part in the qualification round, and K=3K=3 of them advance to the final.

  • The participant who ranked 11-st in the qualification wants to participate in the final, so the participant advances to the final. 11 participant has advanced so far.
  • The participants who ranked 22-nd and 33-rd in the qualification do not want to participate in the final, so the participants do not advance to the final.
  • The participant who ranked 44-th in the qualification wants to participate in the final, so the participant advances to the final. 22 participants have advanced so far.
  • The participants who ranked 55-th in the qualification does not want to participate in the final, so the participant does not advance to the final.
  • The participant who ranked 66-th in the qualification wants to participate in the final, so the participant advances to the final. 33 participants have advanced so far.
  • Now that 33 people have advanced to the final, no participants ranked 77-th or lower advance to the final.