Vasya works as a DJ in the best Berland nightclub, and he often uses dubstep music in his performance. Recently, he has decided to take a couple of old songs and make dubstep remixes from them.
Let's assume that a song consists of some number of words. To make the dubstep remix of this song, Vasya inserts a certain number of words "WUB" before the first word of the song (the number may be zero), after the last word (the number may be zero), and between words (at least one between any pair of neighbouring words), and then the boy glues together all the words, including "WUB", in one string and plays the song at the club.
For example, a song with words "I AM X" can transform into a dubstep remix as "WUBWUBIWUBAMWUBWUBX" and cannot transform into "WUBWUBIAMWUBX".
Recently, Petya has heard Vasya's new dubstep track, but since he isn't into modern music, he decided to find out what was the initial song that Vasya remixed. Help Petya restore the original song.
Vasya 在最好的 Berland 夜總會擔任 DJ,他經常在表演中使用迴聲音樂。 最近,他決定取幾首老歌,並用它們製作迴聲混音。
讓我們假設一首歌由一些單詞組成。 為了製作這首歌的迴聲混音,Vasya在歌曲的第一個詞之前(數字可能為零),最後一個詞之後(數字可能為零)和詞之間插入了一定數量的單詞“WUB”( 任何一對相鄰單詞之間至少有一個),然後男孩將包括“WUB”在內的所有單詞粘在一起,並在俱樂部播放這首歌。
例如,帶有“I AM X”字樣的歌曲可以轉換為“WUBWUBIWUBAMWUBWUBX”的迴聲混音,但不能轉換為“WUBWUBIAMWUBX”。
最近,Petya 聽到了 Vasya 的新迴聲曲目,但由於他不喜歡現代音樂,他決定找出 Vasya 混音的第一首歌曲是什麼。 幫助 Petya 恢復原曲。
The input consists of a single non-empty string, consisting only of uppercase English letters, the string's length doesn't exceed 200 characters. It is guaranteed that before Vasya remixed the song, no word contained substring "WUB" in it; Vasya didn't change the word order. It is also guaranteed that initially the song had at least one word.
輸入由單個非空字符串組成,僅由大寫英文字母組成,字符串長度不超過 200 個字符。 保證在 Vasya 重新混音之前,其中沒有包含子字符串“WUB”的單詞; 瓦夏沒有改變詞序。 還可以保證最初這首歌至少有一個單詞。
Print the words of the initial song that Vasya used to make a dubstep remix. Separate the words with a space.
打印 Vasya 用於製作迴聲混音的初始歌曲的歌詞。 用空格分隔單詞。
WUBWUBABCWUB
ABC
WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB
WE ARE THE CHAMPIONS MY FRIEND
In the first sample: "WUBWUBABCWUB" = "WUB" + "WUB" + "ABC" + "WUB". That means that the song originally consisted of a single word "ABC", and all words "WUB" were added by Vasya.
In the second sample Vasya added a single word "WUB" between all neighbouring words, in the beginning and in the end, except for words "ARE" and "THE" — between them Vasya added two "WUB".
在第一個示例中:“WUBWUBABCWUB”=“WUB”+“WUB”+“ABC”+“WUB”。 這意味著這首歌最初由一個單詞“ABC”組成,而所有單詞“WUB”都是由 Vasya 添加的。
在第二個示例中,Vasya 在所有相鄰單詞之間添加了一個單詞“WUB”,在開頭和結尾,除了單詞“ARE”和“THE”——Vasya 在它們之間添加了兩個“WUB”。
ID | User | Problem | Subject | Hit | Post Date |
沒有發現任何「解題報告」 |