atcoder#ABC290B. [ABC290B] Qual B
[ABC290B] Qual B
Score : points
Problem Statement
There were contestants in the qualification round of a programming contest. All contestants got distinct ranks. You are given a length- string , which represents whether the contestants want to participate in the final round or not. Specifically,
- if the -th character of is
o
, the contestant ranked -th in the qualification wants to participate in the final; - if the -th character of is
x
, the contestant ranked -th in the qualification does not want to participate in the final.
Among those who want to participate in the final, contestants with the smallest ranks advance to the final.
Print a string of length that satisfies the following conditions:
- if the contestant ranked -th in the qualification advances to the final, the -th character of is
o
; - if the contestant ranked -th in the qualification does not advance to the final, the -th character of is
x
.
Constraints
- and are integers.
- is a string of length consisting of
o
andx
. - has at least
o
's.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
10 3
oxxoxooxox
oxxoxoxxxx
In this input, people took part in the qualification round, and of them advance to the final.
- The participant who ranked -st in the qualification wants to participate in the final, so the participant advances to the final. participant has advanced so far.
- The participants who ranked -nd and -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 -th in the qualification wants to participate in the final, so the participant advances to the final. participants have advanced so far.
- The participants who ranked -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 -th in the qualification wants to participate in the final, so the participant advances to the final. participants have advanced so far.
- Now that people have advanced to the final, no participants ranked -th or lower advance to the final.