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.

Input

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.

Output

Print the words of the initial song that Vasya used to make a dubsteb remix. Separate the words with a space.

Examples

Input

WUBWUBABCWUB


Output

ABC 

Input

WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB


Output

WE ARE THE CHAMPIONS MY FRIEND 

Note

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".

Difficulty: EASY

Solutions:
word = input()
word = str.replace(word, 'WUB', ' ')
list1 = word.split()
print(' '.join(list1))


s = input()
i = 0
c = 'WUB'
n = len(s)
while i < n:
	if s[i:i + 3] == c:
		i = i + 3
	else:
		d = i
		while s[i:i + 3] != c and i < n:
			i = i + 1
		print(s[d:i], end=' ')


x = list(map(str, input().split('WUB')))
i = 0
while i < len(x):
	if x[i] == '':
		del x[i]
	else:
		i = i + 1
y = ' '.join(x)
print(y)


ans = ''
for i in input().split('WUB'):
	if i:
		ans += i + ' '
print(ans[:-1])


x = input()
a = x.split('WUB')
for i in a:
	if i != '':
		print(i, end=' ')


l = input().split('WUB')
for i in l:
	if i != '':
		print(i, end=' ')


st = input()
st = st.replace('WUB', ',')
st = st.split(',')
for i in st:
	if len(i) != 0:
		print(i, end=' ')


a = input().split('WUB')
x = len(a)
while '' in a:
	a.remove('')
print(' '.join(a))


import re
s = input()
s = re.sub('WUB', ' ', s)
s = s.strip()
s = s.split()
l = []
for i in s:
	l.append(i.strip())
print(' '.join(l))


n = input().split('WUB')
for i in n:
	if i != '':
		print(i, end=' ')


s = input()
ak = s.split('WUB')
ans = ''
for i in ak:
	if i != '':
		ans += i
		ans += ' '
print(ans)


a = input()
x = [str(i) for i in a.split('WUB')]
for i in range(0, len(x)):
	if x[i] != '':
		print(x[i], end=' ')


s = input()
s = s.replace('WUB', ' ')
s = ' '.join(s.split())
print(s)


s = input()
s = s.split('WUB')
r = ''
for i in s:
	if i != '':
		r = r + i + ' '
print(r[:-1])


a = input().split('WUB')
for i in a:
	if len(i) != 0:
		print(i, end=' ')


s = input()
s = s.replace('WUB', ' ')
s = s.split()
for i in s:
	print(i, end=' ')


a = list(map(str, input().split('WUB')))
r = ''
while a[0] == '':
	a.pop(0)
while a[-1] == '':
	a.pop(-1)
for i in range(len(a)):
	if i == len(a) - 1:
		r = r + a[i]
	elif a[i] != '':
		r = r + a[i] + ' '
print(r)


s = input()
s = s.replace('WUB', ' ')
for i in range(8):
	s = s.replace('  ', ' ')
print(s.strip())


s = input()
s = s.replace('WUB', '1')
x = list()
while len(s) > 0:
	if s[0] == '1':
		s = s[1:]
	elif '1' not in s:
		x.append(s)
		s = ''
	else:
		x.append(s[:s.index('1')])
		s = s[s.index('1') + 1:]
print(' '.join(x))


inp = str(input())
list = inp.split('WUB')
list = [x for x in list if x != '']
print(*list)


print(*[i for i in input().split('WUB') if i != ''])


s = str(input())
song = list(s)
n = len(s)
for i in range(n - 2):
	if s[i:i + 3] == 'WUB':
		song[i] = ' '
		song[i + 1] = ' '
		song[i + 2] = ' '
lyric = ''.join(song)
lyrics = str(lyric).split()
print(' '.join(lyrics))


n = input()
m = n.replace('WUB', ' ')
a = ' '.join(m.split())
print(a)


s = input()
x = s.split('WUB')
for values in x:
	if values != '':
		print(values, end=' ')


s = input()
l = s.split('WUB')
t = []
for i in range(len(l)):
	if l[i] != '':
		t.append(l[i])
		t.append(' ')
print(''.join(t))


s = input()
l = list(s.split('WUB'))
l = [x for x in l if x != '']
print(' '.join(l))


dubstep = input()
ans = ''
ls = dubstep.split('WUB')
it = -1
while ls[it] == '':
	it -= 1
it = len(ls) + it
for (idx, i) in enumerate(ls):
	if i == '':
		continue
	else:
		ans += i
		if idx != it:
			ans += ' '
print(ans)


def Sol(song):
	song = list(song)
	ans = ''
	while len(song) > 2:
		if song[0] == 'W':
			if song[1] == 'U':
				if song[2] == 'B':
					song = song[3:]
					ans += ' '
				else:
					ans += 'WU'
					song = song[2:]
			else:
				song = song[1:]
				ans += 'W'
		else:
			ans += song[0]
			song = song[1:]
	for i in song:
		ans += i
	ans = list(ans.split())
	for i in ans:
		print(i, end=' ')
	return
n = input()
Sol(n)


string = input()
arr = string.split('WUB')
for each in range(len(arr)):
	if arr[each] != '':
		print(arr[each], end=' ')


s = input()
w = s.split('WUB')
for word in w:
	if len(word) > 0:
		print(word, end=' ')


words = [x for x in input().split('WUB') if x != '']
output = ''
for word in words:
	output = output + word + ' '
print(output[:len(output) - 1])


x = input().split('WUB')
while '' in x:
	x.remove('')
print(' '.join(x))


s = input().split('WUB')
for i in range(len(s)):
	if s[i] != '':
		print(s[i], end=' ')


dubstep = input().split('WUB')
for word in dubstep:
	if word != '':
		print(word, end=' ')


s = input()
i = 0
while i < len(s):
	i = s.find('WUB')
	if i == 0:
		s = s[i + 3:]
	elif i > 0:
		s = s[:i] + ' ' + s[i + 3:]
	else:
		break
for i in list(s.split()):
	print(i, end=' ')


remix = input()
remLs = remix.split('WUB')
while remLs.count(str('')) > 0:
	remLs.remove(str(''))
print(' '.join(remLs))


s = input()
s1 = s.replace('WUB', ' ')
s2 = s1.strip().split()
print(' '.join(s2))


m = input()
k = m.split('WUB')
res = ''
for element in k:
	if element != '':
		res += element
		res += ' '
print(res)


s = input()
song = []
i = 0
while True:
	p = i
	i = s.find('WUB', i)
	if i < 0:
		song.append(s[p:])
		break
	else:
		if i != p:
			song.append(s[p:i])
		i += 3
print(' '.join(song))


def dis(song):
	return ' '.join(song.replace('WUB', ' ').split())
print(dis(input()))


a = input()
l = a.split('WUB')
l = list(filter(lambda x: x != '', l))
if len(l) != 1:
	l = ' '.join(l)
	print(l)
else:
	print(l[0])


s = list(map(str, input().split('WUB')))
l = s[:]
for i in range(len(s)):
	if s[i] == '':
		l.remove(s[i])
for i in range(0, len(l)):
	print(l[i], end=' ')


s = input()
s = s.replace('WUB', ' ')
print(' '.join((i for i in s.split())))


L = [x for x in input().split('WUB')]
for x in L:
	if x == '':
		pass
	else:
		print(x, end=' ')


st = input()
i = 0
while i < len(st):
	podst = ''
	if st[i:i + 3] == 'WUB':
		i += 3
	else:
		while st[i:i + 3] != 'WUB' and i < len(st):
			podst += st[i]
			i += 1
		print(podst, end=' ')


a = input()
while 'WUB' in a:
	if a.find('WUB') == a.find('WUBWUB'):
		a = a.replace('WUB', '', 1)
	else:
		a = a.replace('WUB', ' ', 1)
if a[-1] == ' ':
	a = a[:-1]
if a[0] == ' ':
	a = a[1:]
print(a)


string = str(input())
print(' '.join(string.replace('WUB', ' ').split()))


import math
import sys
import re
s = input()
a = s.split('WUB')
a1 = []
for x in a:
	if x != '':
		a1.append(x)
print(' '.join(a1))


s = input()
nl = list()
ns = s.replace('WUB', ' ')
nl = ns.strip().split()
for i in nl:
	print(i, end=' ')


song = input()
print(' '.join(list(filter(None, song.split('WUB')))))


userEntry = input().split('WUB')
original = ''
for word in userEntry:
	if word != '':
		if original == '':
			original = word
		else:
			original += ' ' + word
print(original)


a = input()
if a.find('WUB') != -1:
	a = a.split('WUB')
	a = [i for i in a if i != '']
	print(' '.join(a))
else:
	print(a)


a = input()
print(' '.join(a.replace('WUB', ' ').split()))


song = input()
letters = list(song)
list_of_wub_indexes = list()
for i in range(len(letters) - 2):
	if letters[i] == 'W' and letters[i + 1] == 'U' and (letters[i + 2] == 'B'):
		list_of_wub_indexes.append(i)
original_song = list()
for i in range(len(letters)):
	if i not in list_of_wub_indexes and i - 1 not in list_of_wub_indexes and (i - 2 not in list_of_wub_indexes):
		original_song.append(letters[i])
	else:
		original_song.append(' ')
print(' '.join(''.join(original_song).split()))


x = list(input().split('WUB'))
y = []
for i in x:
	if i != '':
		y.append(i)
print(' '.join(y))


s = input().split('WUB')
i = 0
while i < len(s) - 1:
	if len(s[i]) > 0:
		print(s[i], end=' ')
	i += 1
if len(s[i]) > 0:
	print(s[i])


s = input()
l = len(s)
p = ''
flag = 0
i = 0
while i < l:
	if i + 2 < l and s[i] == 'W' and (s[i + 1] == 'U') and (s[i + 2] == 'B'):
		if flag == 1:
			p += ' '
			flag = 0
		i += 3
	else:
		p += s[i]
		flag = 1
		i += 1
if p[len(p) - 1] == ' ':
	print(p[0:len(p) - 1])
else:
	print(p)


s = list(map(str, input().split('WUB')))
l = []
for i in s:
	if i != '':
		l.append(i)
print(*l)


for elm in list(input().split('WUB')):
	if elm != '':
		print(elm, end=' ')


a = input()
b = a.split('WUB')
c = []
for i in b:
	if i != '':
		c.append(i)
print(' '.join(c))


def solve(str1, s):
	if len(str1) <= 3:
		print(str1)
		return
	i = 0
	ans = ''
	f = 0
	while i < len(str1):
		if i < len(str1) - 2 and str1[i] + str1[i + 1] + str1[i + 2] == s:
			if f:
				ans += ' '
				f = 0
			i += 3
			continue
		ans += str1[i]
		f = 1
		i += 1
	print(ans)
s = 'WUB'
str1 = input()
solve(str1, s)


dubbedSong = input()
songList = dubbedSong.split('WUB')
songList = list(filter(None, songList))
print(' '.join(songList))


s = input()
snew = s.replace('WUB', ' ')
l = snew.split()
output = ' '.join(l)
print(output)


import re
n = input()
new = n.replace('WUB', ' ')
result = ' '.join(new.split())
print(result)


fr = input().split('WUB')
f = list()
for i in range(len(fr)):
	if fr[i]:
		f.append(fr[i])
print(*f)


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
lcm = lambda x, y: x * y // gcd(x, y)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 0 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7
print(*[i for i in S().split('WUB') if i.replace(' ', '')])


import re
result = re.sub(' +', ' ', input().replace('WUB', ' '))
print(result[0] == ' ' and result[1:] or result)


n = list(input().split('WUB'))
for i in range(len(n)):
	if n[i] == '':
		True
	else:
		print(n[i], end=' ')


s = input()
l1 = len(s)
i = 0
l = []
st = ''
while i <= l1 - 3:
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		i = i + 3
	else:
		l.append(i)
		i = i + 1
while i < l1:
	l.append(i)
	i = i + 1
for i in l:
	if i + 1 in l:
		st = st + s[i]
	else:
		st = st + s[i] + ' '
print(st)


s = list(input().split('WUB'))
while True:
	if s.count('') == 0:
		break
	s.remove('')
print(' '.join(s))


a = [s for s in input().split('WUB')]
for s in a:
	if s:
		print(s, end=' ')


A = input().split('WUB')
for i in range(len(A)):
	if A[i] != '':
		print(A[i], end=' ')


k = input().replace('WUB', ' ').split()
print(' '.join(k))


s = input().split('WUB')
while '' in s:
	s.remove('')
print(' '.join(s))


s = input()
i = 0
mas = s.split('WUB')
s = ''
masc = []
for i in mas:
	if i != '':
		masc.append(i)
print(' '.join(masc))


a = input().split('WUB')
s = ''
for i in a:
	if i == '':
		continue
	else:
		s = s + i + ' '
print(s.rstrip())


s = input()
i = 0
song = []
cur = ''
while i < len(s):
	if i + 2 < len(s) and i + 1 < len(s) and (s[i] == 'W') and (s[i + 1] == 'U') and (s[i + 2] == 'B'):
		if len(cur):
			song.append(cur)
			cur = ''
		i += 3
	else:
		cur += s[i]
		i += 1
if len(cur):
	song.append(cur)
print(*song)


n = input()
l = n.split('WUB')
s = ''
for i in range(len(l)):
	if l[i] != '':
		s = s + l[i] + ' '
print(s)


st1 = input()
st3 = ''
st2 = st1.replace('WUB', ' ').split(' ')
for i in st2:
	if i != '':
		st3 = st3 + i + ' '
print(st3.strip())


import copy
str_0 = input()
list_0 = str_0.split('WUB')
k = list_0.count('')
j = copy.deepcopy(k)
for i in range(j):
	del list_0[list_0.index('')]
print(' '.join(list_0))


x = input()
x = x.replace('WUB', '.')
x = x.split('.')
p = []
for i in x:
	if i == '':
		pass
	else:
		p.append(i)
print(' '.join(p))


string = input().split('WUB')
for i in string:
	if i != '':
		print(i, end=' ')


x = input()
print(' '.join(filter(lambda x: x, x.split('WUB'))))


s = input()
s = s.replace('WUB', ' ')
l = s.split(' ')
for i in l:
	if i != '':
		print(i, end=' ')


s = input()
r = ''
a = []
x = 0
while x < len(s):
	if s[x:x + 3] == 'WUB':
		if r != '':
			a.append(r)
		x = x + 3
		r = ''
	else:
		r = r + s[x]
		x = x + 1
if r != '':
	a.append(r)
for i in a:
	print(i, end=' ')


_ = input().replace('WUB', ' ')
__ = ''
____ = False
_0DXFF = False
for ___ in range(len(_)):
	if _[___] != ' ':
		__ += _[___]
		_0DXFF = True
	elif __ != '' and _0DXFF:
		____ = True
	if ____:
		__ += ' '
		____ = False
		_0DXFF = False
print(__)


print(' '.join((i for i in input().replace('WUB', ' ').split(' ') if i != '')))


s = str(input())
for i in s.split('WUB'):
	if len(i) != 0:
		print(i, end=' ')


s = input()
s = list(s)
i = 2
flag = True
while i < len(s) + 2:
	if i < len(s) and s[i - 2] == 'W' and (s[i - 1] == 'U') and (s[i] == 'B'):
		if flag and i != 2 and (i != len(s) - 1):
			print(' ', end='')
		flag = False
		i += 3
	else:
		flag = True
		print(s[i - 2], end='')
		i += 1


str_0 = input()
list_0 = str_0.split('WUB')
k = list_0.count('')
for i in range(k):
	del list_0[list_0.index('')]
print(' '.join(list_0))


import re
string = input()
string = string.replace('WUB', ' ')
string = re.sub(' +', ' ', string)
print(string.lstrip())


n = input()
a = []
a = list(n)
k = 0
c = 0
while k < len(a) - 3:
	if a[k] == 'W' and a[k + 1] == 'U' and (a[k + 2] == 'B'):
		k = k + 3
	else:
		break
while k < len(a) - 3:
	if a[k] == 'W' and a[k + 1] == 'U' and (a[k + 2] == 'B'):
		c = c + 1
		k = k + 2
		if c == 1:
			print(' ', end='')
	else:
		print(a[k], end='')
		c = 0
	k += 1
if k == len(a) - 3:
	if a[k] == 'W' and a[k + 1] == 'U' and (a[k + 2] == 'B'):
		print('', end='')
	else:
		while k <= len(a) - 1:
			print(a[k], end='')
			k += 1
else:
	while k <= len(a) - 1:
		print(a[k], end='')
		k += 1


s = input().split('WUB')
res = ''
for i in s:
	if i != '':
		res += i
		res += ' '
print(res.strip())


text = input()
wub = 'WUB'
result = ''
while True:
	i = text.find(wub)
	if i == -1:
		if text:
			if not result:
				result = text
			else:
				result += ' ' + text
		break
	else:
		word = text[0:i]
		if word:
			if not result:
				result = word
			else:
				result += ' ' + word
		text = text[i + len(wub):]
print(result)


s = input()
i = 0
l = []
l1 = []
while i < len(s):
	if s[i:i + 3] == 'WUB':
		l.append(s[i:i + 3])
		i += 3
	else:
		l.append(s[i])
		i += 1
j = 0
while l[j] == 'WUB':
	l.remove(l[j])
l.reverse()
k = 0
while l[k] == 'WUB':
	l.remove(l[k])
l.reverse()
for m in range(len(l)):
	if l[m] == 'WUB':
		l[m] = ' '
for o in range(len(l)):
	if l[o] != ' ':
		l1.append(l[o])
	elif l1[len(l1) - 1] == ' ':
		continue
	else:
		l1.append(l[o])
ss = ''
for u in l1:
	ss += u
print(ss)


import re
n = input()
n = re.sub('^(WUB)*|(WUB)*$', '', n)
n = re.sub('(WUB)+', ' ', n)
print(n)


import sys
text = sys.stdin.readline()
text = text.replace('WUB', ' ')
print(' '.join(text.split()))


inp_str = str(input())
inp_list = inp_str.split('WUB')
print(' '.join((str(x) for x in inp_list if len(x) > 0)))


remix = input()
words = [x for x in remix.split('WUB') if x != '']
print(' '.join(words))


w = input()
s = w.replace('WUB', ' ')
s = s.strip()
print(' '.join(s.split()))


def main():
	str = input()
	output = str.split('WUB')
	refind = []
	for ind in range(len(output)):
		if output[ind] != '' and output[ind] != '\n':
			refind = refind + [output[ind]]
	str = ' '.join(refind)
	print(str)
main()


song = input().split('WUB')
while '' in song:
	song.remove('')
print(' '.join(song))


s = input()
i = 0
j = 0
l = len(s)
if 'WUB' not in s:
	print(s)
else:
	while i < l:
		if i < l - 2 and s[i] + s[i + 1] + s[i + 2] == 'WUB':
			i += 3
			j = i
			if i < l - 2:
				while i < l - 2 and s[i] + s[i + 1] + s[i + 2] != 'WUB':
					print(s[i], end='')
					i += 1
				if i >= l - 2:
					print(s[i] + s[i + 1])
					i += 2
					break
				if j != i:
					print(' ', end='')
			elif i < l:
				while i < l:
					print(s[i], end='')
					i += 1
		else:
			print(s[i], end='')
			i += 1
			if s[i] + s[i + 1] + s[i + 2] == 'WUB':
				print(' ', end='')


entrada = input()
entrada = entrada.replace('WUB', ' ').split()
for i in range(len(entrada) - 1):
	print(entrada[i], end=' ')
print(entrada[-1])


import re
string = input()
first = re.sub('(WUB)+', ' ', string)
print(first.strip())


string = input()
stri = string.split('WUB')
st = []
for i in range(len(stri)):
	if bool(stri[i]) == True:
		st.append(stri[i])
print(' '.join(st).strip())


s = input()
k = ''
L = list(s.split('WUB'))
for i in range(0, len(L)):
	if L[i]:
		k += L[i] + ' '
print(k)


s = input()
a = s.replace('WUB', ' ')
b = ' '.join(a.split())
print(b)


import re
s = input()
line = re.sub('WUB', ' ', s)
line = re.sub(' +', ' ', line)
if line[0] == ' ':
	line = line[1:]
print(line)


word = input()
w = []
x = ''
for j in range(len(word)):
	w.append(word[j])
w.append('W')
w.append('U')
w.append('B')
i = 0
while i < len(w) - 2:
	if w[i] + w[i + 1] + w[i + 2] == 'WUB':
		i += 3
		continue
	else:
		x += w[i]
		if w[i + 1] + w[i + 2] + w[i + 3] == 'WUB' and i != len(word) - 3:
			x += ' '
		i += 1
print(x)


x = input()
x = x.replace('WUB', '.')
words = x.split('.')
for i in words:
	if len(i) >= 1:
		print(i, end=' ')


word = input().replace('WUBWUB', 'WUB')
a = word.split('WUB')
b = [i for i in a if i != '']
for i in b:
	print(i, end=' ')


line = input().split('WUB')
line1 = ' '.join(line)
line2 = line1.strip().split()
print(' '.join(line2))


print(' '.join([k for k in input().split('WUB') if k != '']))


n = input()
n = n.replace('WUB', ' ')
n = n.strip()
while n.rfind('  ') != -1:
	n = n.replace('  ', ' ')
print(n)


song = str(input())
b = song.split('WUB')
initial_song = ''
for i in b:
	if i != '':
		initial_song = initial_song + ' ' + i
print(initial_song)


x = input()
for i in range(len(x) // 3, 0, -1):
	v = i * 'WUB'
	if v in x:
		x = x.replace(v, ' ')
if x[0] == ' ':
	print(x[1:])
else:
	print(x)


n = input()
while 'WUB' in n:
	n = n.replace('WUB', ' ')
n = list(map(str, n.split()))
print(' '.join(n))


print(' '.join([x for x in input().strip().split('WUB') if x != '']))


s = input().split('WUB')
s = list(s)
i = 0
sentence = ''
while i < len(s) - 1:
	if len(s[i]) > 0:
		sentence += s[i] + ' '
	i += 1
sentence += s[len(s) - 1]
print(sentence)


n = input()
s = n.replace('WUB', ' ')
s = s.split()
z = ' '.join(s)
print(z)


a = input()
b = a.split('WUB')
c = ''
for i in b:
	if i != '':
		c = c + i + ' '
print(c)


x = input().split('WUB')
mylist = ' '.join(x)
mylist = mylist.split()
for i in range(len(mylist)):
	print(mylist[i], end=' ')


s = input()
n = len(s)
k = 0
while k <= n - 1:
	if k <= n - 3 and s[k:k + 3] == 'WUB':
		k += 3
	else:
		for l in range(k, n):
			if l >= n - 2:
				print(s[l], end='')
				if l == n - 1:
					k = n
			elif s[l:l + 3] != 'WUB':
				print(s[l], end='')
			else:
				print(' ', end='')
				k = l + 3
				break


w = input().split('WUB')
for i in w:
	if i == '':
		continue
	print(i, sep=' ', end=' ')


from sys import stdin, stdout
import sys
import math

def get_int():
	return int(stdin.readline().strip())

def get_ints():
	return map(int, stdin.readline().strip().split())

def get_array():
	return list(map(int, stdin.readline().strip().split()))

def get_string():
	return stdin.readline().strip()

def op(c):
	return stdout.write(c)
a = get_string()
l = len(a)
i = 0
f = 0
c = False
ans = ''
while i < l:
	c = False
	if a[i] == 'W' and i + 1 < l:
		if a[i + 1] == 'U' and i + 2 < l:
			if a[i + 2] == 'B':
				c = True
				i += 3
				if f == 1:
					if ans[-1] != ' ':
						ans += ' '
	if c == False:
		if f == 0:
			f = 1
		ans += a[i]
		i += 1
print(ans)


import re
a = input()
b = a.replace('WUB', ' ')
print(re.sub(' +', ' ', b))


def mysplit(s, d):
	ans = []
	w = ''
	i = 0
	while i < len(s):
		match = True
		if i <= len(s) - len(d):
			j = 0
			while j < len(d):
				if s[i + j] != d[j]:
					match = False
					break
				j = j + 1
		else:
			match = False
		if match == True:
			if len(w) != 0:
				ans.append(w)
			w = ''
			i = i + len(d)
		else:
			w = w + s[i]
			i = i + 1
	if len(w) != 0:
		ans.append(w)
	return ans
s = input().strip()
os = mysplit(s, 'WUB')
print(' '.join(os))


text = input()
text = text.replace('WUB', ' ')
li = text.split()
for i in li:
	print(i, end=' ')


string = str(input())
word = string.split('WUB')
n = word.count('')
i = 0
while i < n:
	i = i + 1
	word.remove('')
sentence = ' '.join(word)
sentence = sentence.strip(' ')
print(sentence)


s = input()
temp = s.split('WUB')
ans = list()
for q in temp:
	if q == '':
		continue
	ans.append(q)
for q in ans:
	print(q, end=' ')


s = input()
s = s.replace('WUB', ' ')
s = s.replace('          ', ' ')
s = s.replace('         ', ' ')
s = s.replace('        ', ' ')
s = s.replace('       ', ' ')
s = s.replace('      ', ' ')
s = s.replace('     ', ' ')
s = s.replace('   ', ' ')
s = s.replace('  ', ' ')
if s[0] == ' ':
	s = s[1:]
if s[-1] == ' ':
	s = s[:-1]
print(s)


s = input()
i = 0
ans = ''
while i < len(s):
	if i + 2 < len(s) and s[i] == 'W' and (s[i + 1] == 'U') and (s[i + 2] == 'B'):
		if ans != '' and ans[len(ans) - 1] != ' ':
			ans += ' '
		i += 2
	else:
		ans += s[i]
	i += 1
print(ans)


str = input()
list = str.split('WUB')
res = ''
for i in list:
	if i != '':
		res += i + ' '
print(res[:-1])


n = input()
i = 0
while i < len(n) - 2:
	if n[i] == 'W' and n[i + 1] == 'U' and (n[i + 2] == 'B'):
		n = n[:i] + n[i + 3:]
		n = n[:i] + ' ' + n[i:]
	else:
		i = i + 1
l = n.split()
print(*l)


remix = input()
remix = remix.replace('WUB', ' ')
remix.strip()
output = ' '.join(remix.split())
print(output)


lyrics = input().split('WUB')
remove = ['']
lyric = [i for i in lyrics if i not in remove]
print(*lyric)


str = input()
temp = ''
i = 0
while i < len(str):
	if str[i:i + 3] == 'WUB':
		i += 3
		continue
	else:
		while str[i:i + 3] != 'WUB' and i < len(str):
			temp += str[i]
			i += 1
		temp += ' '
print(temp)


str = input()
str = str.split('WUB')
for i in str:
	if i != '':
		print(i, end=' ')


a = input()
b = a.replace('WUB', ' ')
if b[0] != ' ':
	print(b[0], end='')
for i in range(1, len(b)):
	if b[i] != ' ':
		print(b[i], end='')
	elif b[i] == ' ' and b[i - 1] != ' ':
		print(b[i], end='')


s = input()
words = [word for word in s.split('WUB') if word]
print(' '.join(words))


s = input()
lst = s.split('WUB')
str = ''
for i in lst:
	if i != '':
		str += ' ' + i
print(str)


s = input()
while s.find('WUB') != -1:
	f = s.find('WUB')
	s = s[:f] + ' ' + s[f + 3:]
s = s.strip()
l = s.split(' ')
a = ''
for i in l:
	if i != '':
		a = a + i + ' '
a = a.strip()
print(a)


s = input()
l = s.split('WUB')
ans = [x for x in l if x != '']
print(*ans)


s = input()
s = s.replace('WUB', ' ')
s = s.lstrip()
s = s[::-1]
s = s.lstrip()
s = s[::-1]
while '  ' in s:
	s = s.replace('  ', ' ')
print(s)


dub = [e for e in input().split('WUB') if e is not '']
print(' '.join(dub))


import math
n = input().replace('WUB', ' ')
n = n.split()
for i in n:
	print(i, end=' ')


print(*input().replace('WUB', ' ').split())


import re
g = input()
g = g.replace('WUB', ' ')
g = g.lstrip()
g = re.sub(' +', ' ', g)
print(g)


n = input()
l = n.split('WUB')
while '' in l:
	l.remove('')
for i in l:
	print(i, end=' ')


input_str = input()
output_list = []
pos = 0
current_pos = 0
while not pos == -1:
	pos = input_str.find('WUB', current_pos)
	if not pos == current_pos and (not pos == -1):
		output_list.append(input_str[current_pos:pos])
	if pos == -1:
		output_list.append(input_str[current_pos:])
	current_pos = pos + 3
print(' '.join(output_list))


s = input()
n = len(s)
i = 0
space = False
k = 0
while i < n:
	if i < n - 2 and s[i] == 'W' and (s[i + 1] == 'U') and (s[i + 2] == 'B'):
		i += 3
		if k != 0:
			space = True
	else:
		if space:
			print(' ', end='')
			space = False
		print(s[i], end='')
		i += 1
		k += 1


s = input()
snew = s.replace('WUB', ' ')
li = list(snew)
li1 = []
s = ''
for i in range(0, len(li)):
	if li[i] != ' ':
		s = s + li[i]
	else:
		li1.append(s)
		s = ''
li1.append(s)
for i in li1:
	if i != '':
		print(i, end=' ')


s = input()
array = s.split('WUB')
ans = ''
for x in array:
	if x != '':
		ans += x + ' '
ans = ans[:len(ans) - 1]
print(ans)


word = input()
print(' '.join(' '.join(word.split('WUB')).split()))


list = input().split('WUB')
result = ''
for word in list:
	if word != '':
		result += ' ' + word
print(result.replace(' ', '', 1))


li = [a for a in input().split('WUB') if a != '']
for a in li:
	print(a, end=' ')


s = str(input()).split('WUB')
s1 = s[:]
for i in range(s.count('')):
	s1.remove('')
print(' '.join(s1))


remixed = input().split('WUB')
print(' '.join((i for i in remixed if i)))


song = input()
song = song.split('WUB')
words = [i for i in song if i != '']
print(' '.join(words))


string = input()
string = string.replace('WUB', ' ')
string = string.strip()
line = list(string.split(' '))
for i in line:
	if i != '':
		print(i, end=' ')


s = input()
s = s.replace('WUB', ' ')
ar = list(map(str, s.split()))
for i in ar:
	print(i, end=' ')


inputLine = input()
myList = inputLine.split('WUB')
while myList.count('') > 0:
	myList.remove('')
print(' '.join(myList))


S = input().split('WUB')
for x in S:
	if x != '':
		print(x, end=' ')


inp = input().strip()
inp = inp.replace('WUB', ' ').split()
print(' '.join(inp))


print(' '.join(' '.join(input().split('WUB')).split()))


string = list(filter(lambda x: x, input().split('WUB')))
print(' '.join(string))


s = input()
S = ''
if s.find('WUB') != -1:
	S = s.replace('WUB', ' ')
	S = S.strip()
	s1 = S.split()
	s2 = ' '.join(s1)
	print(s2)
else:
	print(s)


s = input()
r = s.replace('WUB', ' ')
t = ' '.join(r.split())
print(t)


lt = input().split('WUB')
lt = [x for x in lt if x != '']
print(' '.join(lt))


print(' '.join(list(filter(lambda x: x != '', input().split('WUB')))).strip())


s = input()
a = s.split('WUB')
b = [i for i in a if i != '']
s1 = ''
s1 = s1 + b[0]
for i in range(1, len(b)):
	s1 = s1 + ' ' + b[i]
print(s1)


n = list(input().split('WUB'))
t = []
for k in n:
	if k != '':
		t.append(k)
print(*t)


n = input()
t = n.split('WUB')
s = ''
s += ' '.join([str(i) for i in t if i != ''])
print(s)


def myMethod(s):
	s = s.replace('WUB', ' ')
	return ' '.join(s.split())
s = str(input())
print(myMethod(s))


s1 = input()
s1 = s1.replace('WUB', ' ')
l = len(s1)
for i in range(l):
	if i == l - 1:
		if s1[i] == ' ':
			continue
	if s1[i] == ' ' and s1[i + 1] == ' ':
		continue
	print(s1[i], end='')


import re
s = input()
s = s.replace('WUB', ' ').strip()
print(re.sub(' +', ' ', s))


m = list(map(str, input().split('WUB')))
k = m.count('')
if k != 0:
	for i in range(k):
		m.remove('')
print(' '.join(m))


n = input()
n = n.upper()
i = n.find('WUB')
z = [n]
while i != -1:
	i = n.find('WUB')
	n = n.replace('WUB', ' ')
	z = n.split()
x = ''
for i in z:
	x = x + i + ' '
print(x[:x.rfind(' ')])


print(' '.join(filter(None, input().split('WUB'))))


s = input()
i = 0
lst = []
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i += 3
	else:
		j = i
		s1 = ''
		while s[j:j + 3] != 'WUB' and j < len(s):
			s1 += s[j]
			j += 1
		lst.append(s1)
		i = j
print(' '.join(lst))


class Code:

	def __init__(self):
		self.s = input().split('WUB')

	def process(self):
		print(*[item for item in self.s if item != ''], sep=' ')
code = Code()
code.process()


l = input().replace('WUB', ' ')
print(' '.join(l.split()))


sentence = list(input())
total = len(sentence)
sentence.append('W')
sentence.append('U')
sentence.append('B')
q = 0
line = []
while q < total:
	if sentence[q] == 'W' and sentence[q + 1] == 'U' and (sentence[q + 2] == 'B'):
		q += 3
	else:
		line.append(sentence[q])
		if sentence[q + 1] == 'W' and sentence[q + 2] == 'U' and (sentence[q + 3] == 'B'):
			line.append(' ')
		q += 1
line.pop()
print(''.join(line))


s = input()
s1 = s.replace('WUB', ' ')
s1 = list(s1.split())
print(' '.join(s1), end=' ')


def Convert(string):
	li = list(string.split('WUB'))
	return li
str1 = input()
l = []
l = Convert(str1)
k = len(l)
for i in range(k):
	if l[i] != '':
		print(l[i], end=' ')


def initial(s):
	p = s.find('WUB')
	if p < 0:
		return s
	elif p == 0:
		return initial(s[3:])
	else:
		return s[0:p] + ' ' + initial(s[p + 3:])
print(initial(input()))


s = input()
s = s.replace('WUB', ',').strip(',')
l = s.split(',')
i = 0
while i < len(l):
	if l[i] == '':
		l.remove('')
		i -= 1
	i += 1
print(' '.join(l))


s = input()
x = s.replace('WUB', ' ')
l = list(x.split())
print(' '.join(l))


s = input()
l = list(filter(lambda x: x != '', s.split('WUB')))
for i in l:
	print(i, end=' ')


str1 = input()
str1 = str1.split('WUB')
for name in str1:
	if name != '':
		print(name, end=' ')


TN = 1

def solution():
	s = input()
	an_s = list(s.split('WUB'))
	ans = []
	for i in an_s:
		if i != '':
			ans += [i]
	print(' '.join(ans))
while TN != 0:
	solution()
	TN -= 1


s = input()
pattern = 'WUB'
space_printed = True
while s:
	if s[:3] == pattern:
		s = s[3:]
		if not space_printed:
			print(' ', end='')
			space_printed = True
	else:
		print(s[0], end='')
		s = s[1:]
		space_printed = False


a = input()
b = a.replace('WUB', ' ')
c = b.split()
print(*c)


n = list(map(str, input().split('WUB')))
for i in n:
	if i != '':
		print(i, end=' ')


s = input()
l1 = []
l = [i for i in s.split('WUB')]
for i in l:
	if len(i) != 0:
		l1.append(i)
print(*l1)


lis = list(input().split('WUB'))
for i in lis:
	if len(i) != 0:
		print(i, end=' ')


def resolve(song):
	return ' '.join([i for i in song.split('WUB') if i != ''])
world = input()
print(resolve(world))


line = input()
arr = []
i = 0
prr = []
arr.append('3')
while i < len(line):
	l = i
	if l < len(line) - 2:
		if line[i] == 'W' and line[i + 1] == 'U' and (line[i + 2] == 'B'):
			i += 3
			arr.append(' ')
		else:
			arr.append(line[i])
			i += 1
	else:
		arr.append(line[i])
		i += 1
i = 0
while i < len(arr) - 1:
	if arr[i] == ' ' and arr[i + 1] == ' ':
		del arr[i]
	else:
		i += 1
del arr[0]
if arr[0] == ' ':
	arr.remove(arr[0])
if arr[len(arr) - 1] == ' ':
	del arr[len(arr) - 1]
arr = ''.join(arr)
print(arr)


x = input()
s = ''
i = 0
test = True
while i < len(x):
	if x[i:i + 3] == 'WUB':
		i += 3
		test = False
	else:
		if test == False:
			s += ' '
			test = True
		s += x[i]
		i += 1
print(s.strip())


s = input()
s_list = list(s)
song = []
i = 0
space = False
while i < len(s):
	if i == len(s) - 1:
		if space:
			song.append(' ')
		song.append(s[i])
		i += 1
		space = False
	elif i == len(s) - 2:
		if space:
			song.append(' ')
		song.append(s[i])
		i += 1
		if s[i:i + 1] != 'W':
			song.append(s[i])
			i += 1
		space = False
	elif s[i:i + 3] != 'WUB':
		if space:
			song.append(' ')
		song.append(s[i])
		i += 1
		if s[i:i + 1] != 'W':
			song.append(s[i])
			i += 1
		if s[i:i + 1] != 'W':
			song.append(s[i])
			i += 1
		space = False
	else:
		i += 3
		space = True
if song[0] == ' ':
	del song[0]
song = ''.join(song)
print(song)


s = input()
xs = s.split('WUB')
xs = list(filter(None, xs))
print(' '.join(xs))


song = input()

def song_decoder(song):
	while True:
		song = song.replace('WUB', ' ')
		if song.find('WUB') == -1:
			break
	while song.find('  ') is not -1:
		song = song.replace('  ', ' ')
	return song.strip()
print(song_decoder(song))


stri = input().strip().split('WUB')
end = []
for i in stri:
	if i != '':
		end.append(i)
print(' '.join(end))


s = input()
a = s.split('WUB')
l = []
for i in a:
	if i != '':
		l.append(i)
print(' '.join(l))


song = input()
print(' '.join(song.replace('WUB', ' ').split()))


import math
import sys
import string

def ri():
	return input()

def ii():
	return int(input())

def li():
	return input().split()

def mi():
	return list(map(int, input().split()))
s = ri()
while True:
	if 'WUB' in s:
		s = s.replace('WUB', ' ')
	else:
		break
new = s.split()
print(' '.join(new))


s = input().split('WUB')
dec = []
for i in range(0, len(s)):
	if s[i] != '':
		dec.append(s[i])
print(*dec, sep=' ')


import re
print(re.sub('(WUB)+', ' ', input()).lstrip().rstrip())


remix = input()
song = ' '.join(remix.split('WUB'))
res = []
spaces = True
for k in range(len(song)):
	if song[k] != ' ':
		res.append(song[k])
		spaces = False
	else:
		if not spaces:
			res.append(song[k])
		spaces = True
print(''.join(res))


import re
regex = re.compile('\\S*')
s = input()
a = s.replace('WUB', ' ')
p = regex.findall(a)
l = []
for item in p:
	if item != ' ' and item != '':
		l.append(item)
print(' '.join(l))


s = input()
s2 = 'WUB'
sm = ''
s3 = s.split('WUB')
for i in s3:
	if i != '':
		sm = sm + str(i) + ' '
print(sm)


from sys import stdin
import re
s = stdin.readline().strip()
words = re.sub('WUB', ' ', s).split()
print(*words)


w = input()
while w[:3] == 'WUB':
	w = w[3:]
while w[-3:] == 'WUB':
	w = w[:-3]
w = w.replace('WUB', ' ')
w = w.split(sep=' ')
n = w.count('')
for i in range(n):
	w.remove('')
w = ' '.join(w)
print(w)


n = input()
wlist = []
mainstring = ''
str2 = ''
a = 0
if len(n) > 3:
	temp = n[len(n) - 3] + n[len(n) - 2] + n[len(n) - 1]
	if temp != 'WUB':
		n = n + 'WUB'
	while a < len(n) - 2:
		listn = []
		if n[a] == 'W' and n[a + 1] == 'U' and (n[a + 2] == 'B'):
			a = a + 3
		else:
			str2 = str2 + n[a]
			a += 1
			if n[a] == 'W' and n[a + 1] == 'U' and (n[a + 2] == 'B'):
				mainstring = mainstring + str2 + ' '
				str2 = ''
else:
	mainstring = n
print(mainstring)


n = input()
while 'WUB' in n:
	n = n.replace('WUB', ' ')
l = n.split()
print(' '.join(l))


name = input()
import re
new = re.sub('WUB', ' ', name)
temp = new.split(' ')
n = len(temp)
for i in range(0, n):
	if temp[i] != '':
		print(temp[i], end=' ')


s = input().split('WUB')
for i in s:
	if i == '':
		print(i, end='')
	else:
		print(i, end=' ')


s = input().split('WUB')
t = ' '.join(s).split()
print(' '.join(t))


a = input().split('WUB')
l = ''
for i in range(0, len(a)):
	if a[i] != '':
		l += a[i] + ' '
print(l[:len(l) - 1])


line = input()
t1 = line.replace('WUB', ' ')
t2 = t1.strip().split()
for i in t2:
	print(i, end=' ')


import re
a = input()
b = list(a)
i = 0
if len(b) < 3:
	print(a)
else:
	while b[0] + b[1] + b[2] == 'WUB':
		b = b[3:]
		if len(b) < 3:
			print(''.join(b))
			break
	else:
		c = ''.join(b)
		d = list(c[::-1])
		if len(d) < 3:
			print(c[::-1])
		else:
			while d[0] + d[1] + d[2] == 'BUW':
				d = d[3:]
				if len(d) < 3:
					print(''.join(d)[::-1])
					break
			else:
				e = ''.join(d)[::-1]
				result1 = re.sub('WUB', ' ', e)
				result = re.sub('\\ \\ +', ' ', result1)
				print(result)


s = str(input())
while s.find('WUB') >= 0:
	s = s.replace('WUB', ' ')
while s.find('  ') >= 0:
	s = s.replace('  ', ' ')
if s[0] == ' ':
	s = s.replace(' ', '', 1)
print(s)


s = input()
t = 'WUB'
s1 = s.split(t)
for i in s1:
	if i != '':
		print(i, end=' ')


s = str(input())
s = s.replace('WUB', ' ')
s2 = ''
for i in range(len(s)):
	if s[i] == ' ' and s[i - 1] != ' ':
		s2 += s[i]
	elif s[i] != ' ':
		s2 += s[i]
print(s2.strip())


n = str(input())
n = n.replace('WUB', ' ')
n = n.strip()
output = ' '.join(n.split())
print(output)


song = input().split('WUB')
word = []
for i in range(len(song)):
	if song[i] != '':
		word.append(song[i])
ini = ' '.join(word)
print(ini)


s = input()
i = 0
f = 0
l = 0
while i < len(s):
	try:
		if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
			if f == 1:
				print(' ', end='')
			f = 0
			i += 3
		else:
			f = 1
			print(s[i], end='')
			i += 1
	except:
		print(s[i], end='')
		i += 1


string = input()
lis = string.split('WUB')
sen = []
for i in lis:
	if i != '':
		sen.append(i)
string = ''
for word in sen:
	string += str(word) + ' '
print(string[:-1])


s = input()
answer = ''
s = s.split('WUB')
for i in s:
	if i != '':
		answer = answer + i + ' '
print(answer)


T = input()
T += 'WUB'
A = T.replace('WUB', ' ')
s = ''
for x in range(len(A)):
	if A[x] != ' ':
		s += A[x]
	elif s != '':
		print(s, end=' ')
		s = ''


a = input()
a = a.split('WUB')
a = [i for i in a if i != '']
a = ' '.join(a)
print(a)


n = input()
res = []
while len(n) != 0:
	if n.startswith('WUB'):
		n = n[3:]
	elif 'WUB' in n:
		i = n.index('WUB')
		res.append(n[:i])
		n = n[i:]
		if n == 'WUB':
			n = ''
	else:
		i = -1
		res.append(n[:])
		n = ''
res = ' '.join(res)
print(res)


x = input()
x = x.replace('WUB', ' ')
x = x.lstrip()
x = x.split()
for i in range(0, len(x)):
	print(x[i], end=' ')


txt = input()
x = txt.split('WUB')
st = ''
for i in range(0, len(x)):
	if len(x[i]) > 0:
		st = st + str(x[i])
		st = st + ' '
print(st)


string = input()
b = string.split('WUB')
for i in range(0, len(b)):
	if b[i] != '':
		print(b[i], end=' ')


s = input()
words = s.split('WUB')
for word in words:
	if word != '':
		print(word, end=' ')
print()


s = input()
p = s.replace('WUB', ' ')
q = p.strip()
x = q.count(' ')
for i in range(x):
	q = q.replace('  ', ' ')
print(q)


dubstep = input().split('WUB')
list1 = [x for x in dubstep if x]
print(*list1)


n = input().strip()
if 'WUB' in n:
	n = n.replace('WUB', ' ')
word = [x for x in n.strip().split()]
print(' '.join(word))


s = input()
i = 0
ans = ''
while i < len(s):
	if s[i:i + 3] == 'WUB':
		while s[i:i + 3] == 'WUB':
			i += 3
		ans += ' '
	else:
		ans += s[i]
		i += 1
print(ans.strip())


n = list(map(str, input().split('WUB')))
name = []
for i in range(len(n)):
	if n[i] != '':
		name.append(n[i])
print(' '.join(name))


def main():
	remix_song = input()
	remix_part = 'WUB'
	output = ''
	iterator = 0
	wubs_counter = 1
	for i in range(0, len(remix_song)):
		begin = iterator
		end = iterator + 3
		if remix_part == remix_song[begin:end]:
			iterator = end
			if wubs_counter == 0:
				output += ' '
				wubs_counter += 1
			continue
		else:
			wubs_counter = 0
			if iterator >= len(remix_song):
				break
			output += remix_song[iterator]
			iterator += 1
	print(output)
main()


s = input()
if len(s) >= 3:
	while s[0] == 'W' and s[1] == 'U' and (s[2] == 'B'):
		s = s[3:]
		if len(s) <= 3:
			break
if len(s) >= 3:
	while s[len(s) - 3] == 'W' and s[len(s) - 2] == 'U' and (s[len(s) - 1] == 'B'):
		s = s[:len(s) - 3]
		if len(s) <= 3:
			break
s = s.replace('WUB', ' ')
while '  ' in s:
	s = s.replace('  ', ' ')
print(s)


n = input()
n = n.replace('WUB', ' ')
n = n.strip()
li = list(n.split(' '))
for x in li:
	if x != '':
		print(x, end=' ')


w = [str(a) for a in input().strip().split('WUB') if a]
print(' '.join(w))


s = input()
b = s.split('WUB')
c = ' '.join(b)
d = c.split()
print(' '.join(d))


s = str(input())
s = s.split('WUB')
ans = ''
for i in range(len(s)):
	if s[i] != '':
		ans += s[i] + ' '
print(ans)


ip = input()
l = []
i = 0
while i < len(ip):
	if ip[i:i + 3] == 'WUB':
		i += 3
	else:
		k = 0
		while k + i < len(ip) and ip[k + i:k + i + 3] != 'WUB':
			k += 1
		l.append(ip[i:i + k])
		i += k
for i in l:
	print(i, end=' ')


s = input()
res = ''
loc = ''
i = 0
while i < len(s):
	if i <= len(s) - 3 and s[i] == 'W' and (s[i + 1] == 'U') and (s[i + 2] == 'B'):
		if res == '':
			res = loc
		elif loc != '':
			res += ' ' + loc
		i += 2
		loc = ''
	else:
		loc += s[i]
	i += 1
res += ' ' + loc
print(res)


n = input()
n = n.replace('WUB', ' ')
n = n.split()
for i in n:
	print(i, end=' ')


s = str(input())
s = s.split('WUB')
s = list(filter(None, s))
print(*s)


L = input().split('WUB')
L2 = []
for i in L:
	if i != '':
		L2.append(i)
print(*L2)


song = input()
a = song.split('WUB')
while a.count('') != 0:
	a.remove('')
print(' '.join(a))


s = list(input())
j = 0
while j < len(s):
	if s[j:j + 3] == ['W', 'U', 'B']:
		if j == 0 or j == len(s) - 2:
			s[j:j + 3] = []
		else:
			s[j:j + 3] = [' ']
		j -= 1
	if s[j:j + 2] == [' ', ' ']:
		s[j:j + 2] = [' ']
	j += 1
print(''.join(s))


s = input().split('WUB')
f = list()
for i in s:
	if len(i) > 0:
		f.append(i)
print(' '.join(f))


string = input()
tmp = 'WUB'
vis = [True for i in range(500)]
for i in range(2, len(string)):
	if string[i - 2] + string[i - 1] + string[i] == tmp:
		vis[i - 2] = False
		vis[i - 1] = False
		vis[i] = False
a = []
tmp3 = ''
for i in range(0, len(string)):
	if vis[i] == False:
		if tmp3 != '':
			a.append(tmp3)
		tmp3 = ''
		continue
	else:
		tmp3 += string[i]
a.append(tmp3)
print(' '.join(a).strip())


s = input()
n = len(s)
s += 'WUB'
i = 0
p = 0
f = 0
x = ''
while i < n:
	t = s[i] + s[i + 1] + s[i + 2]
	if t == 'WUB':
		i += 3
		f = 1
	else:
		if f:
			f = 0
			if p:
				x += ' '
		x += s[i]
		i += 1
		p = 1
print(x)


s = input()
s = s.split('WUB')
tmp = ''
for i in s:
	if len(i) > 0:
		tmp += i + ' '
print(tmp[:-1])


s = input()
s1 = s.split('WUB')
s2 = ''
for i in range(len(s1)):
	if s1[i] != '':
		s2 = s2 + s1[i] + ' '
print(s2)


s = input()
n = len(s)
i = 0
a = []
l = []
while i < n:
	if s[i:i + 3] == 'WUB':
		i = i + 3
		l.append(''.join(a))
		a = []
	else:
		a.append(s[i])
		i = i + 1
l.append(''.join(a))
for i in l:
	if i != '':
		print(i, end=' ')


s = input()
l = s.split('WUB')
for e in l:
	if e is not 'WUB' and e is not '':
		print(e, end=' ')


s = input()
a = s.replace('WUB', ' ')
a = a.lstrip(' ')
a = ' '.join(a.split())
li = list(a.split(' '))
b = []
for i in li:
	if str(i) != ' ':
		b.append(i)
for i in b:
	print(i, end=' ')


n = input().split('WUB')
for e in n:
	if e != '':
		print(e, end=' ')


w = input()
word = []
for char in w:
	word.append(char)
for i in range(len(word) - 2):
	if word[i] == 'W' and word[i + 1] == 'U' and (word[i + 2] == 'B'):
		word[i] = ''
		word[i + 1] = ''
		word[i + 2] = ''
for i in range(len(word)):
	if word[i] != '':
		print(word[i], end='')
		if i < len(word) - 2:
			if word[i + 1] == '':
				print(word[i + 1], end=' ')


def k(x):
	return x != ''
n = input().split('WUB')
m = filter(k, n)
print(' '.join(list(m)))


s = input()
t1 = s.replace('WUB', ' ')
t2 = t1.strip().split()
print(' '.join(t2))


a = input('')
data = a.split('WUB')
newdata = []
for i in data:
	if len(i) > 0:
		newdata.append(i)
print(' '.join(newdata))


s = input()
t = 'WUB'
i = 0
l1 = []
while i < len(s):
	if i + 3 <= len(s) and s[i:i + 3] == t:
		i += 3
	elif i + 3 <= len(s) and s[i:i + 3] != t:
		s1 = ''
		while i + 3 <= len(s) and s[i:i + 3] != t:
			s1 += s[i]
			i += 1
		if i + 3 > len(s):
			while i < len(s):
				s1 += s[i]
				i += 1
		l1.append(s1)
	else:
		s1 = ''
		while i < len(s):
			s1 += s[i]
			i += 1
		l1.append(s1)
print(*l1)


song = str(input())
n = len(song)
ans = ''
i = 0
while i < n:
	if song[i:i + 3] == 'WUB':
		i += 2
		if len(ans) != 0 and ans[-1] != ' ':
			ans += ' '
	else:
		ans += song[i]
	i += 1
print(ans)


word = input()
check = ''
for i in word:
	word = word.replace('WUB', ' ')
print(' '.join(word.split()))


s = input()
words = []
while len(s) > 0:
	i = 0
	try:
		i = s.index('WUB')
	except:
		words.append(s)
		break
	if i != 0:
		words.append(s[:i])
		s = s[i:]
	else:
		s = s[3:]
print(' '.join(words))


m = input()
m = m.split('WUB')
t = ''
for i in m:
	if i == '':
		pass
	else:
		t = t + i + ' '
t = t.strip()
print(t)


n = input()
n = n.split('WUB')
v = ''
for i in n:
	if i != '':
		v = v + i + ' '
print(v)


s = str(input())
s = s.split('WUB')
s = ' '.join(s).split()
for i in range(len(s)):
	print(s[i], end=' ')


s = input()
n = len(s)
i = 0
k = 0
if n < 3:
	print(s)
else:
	while i < n - 2:
		if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
			if s[i - 1] != 'B' or s[i - 2] != 'U' or s[i - 3] != 'W':
				print(' ', end='')
			i = i + 3
		else:
			print(s[i], end='')
			k = i
			i = i + 1
	if n >= 3:
		if k == n - 3:
			print(s[n - 2], end='')
			print(s[n - 1])
		if k < n - 3:
			if s[n - 2] == 'B':
				print(s[n - 1])
			if s[n - 3] == 'B':
				print(s[n - 2], end='')
				print(s[n - 1])
		if k == n - 2:
			print(s[n - 2], end='')
			print(s[n - 1])
		if k == n - 1:
			print(s[n - 1])


original = input()
words = []
n = len(original)
i = 0
w = ''
while i < n:
	if i + 2 < n and original[i] == 'W' and (original[i + 1] == 'U') and (original[i + 2] == 'B'):
		if w != '':
			words.append(w)
		w = ''
		i += 3
		continue
	w += original[i]
	i += 1
if w != '':
	words.append(w)
print(' '.join(words))


print(' '.join(filter(lambda a: a, input().split('WUB'))))


tmp = input().split('WUB')
while '' in tmp:
	tmp.remove('')
answer = ' '.join(tmp)
print(answer)


s = str(input())
l = len(s)
last = 0
while last < l:
	p = s.find('WUB', last)
	if p == -1:
		p = l
	ans = s[last:p]
	if len(ans):
		print(ans, end=' ')
	last = p + 3
print()


n = input().split('WUB')
for i in range(len(n)):
	if n[i] != '':
		print(n[i], end=' ')


s1 = input()
s2 = s1.split('WUB')
for i in range(len(s2)):
	if s2[i] != '':
		if i != len(s2) - 1:
			print(s2[i], end=' ')
		else:
			print(s2[i])


a = input()
b = a.replace('WUB', ' ')
c = b.split()
d = ' '.join(c)
print(d)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
arr = input().split('WUB')
for s in arr:
	if len(s) > 0:
		print(s, end=' ')


l = input().split('WUB')
s = ''
for x in l:
	if x == '':
		continue
	s += x + ' '
print(s[0:len(s) - 1])


import re
s = input()
a = re.split('(WUB)+', s)
ans = ''
for x in a:
	if x != '' and x != 'WUB':
		ans += x + ' '
print(ans)


string = input()
s = ''
s = string.replace('WUB', ' ')
s = s.strip(' ')
a = ''
for i in range(len(s) - 1):
	if s[i] != ' ' and s[i + 1] != ' ' or (s[i] == ' ' and s[i + 1] != ' ') or (s[i] != ' ' and s[i + 1] == ' '):
		a += s[i]
print(a + s[-1])


x = input()
i = 0
c = 1
while i < len(x) - 2:
	if x[i] == 'W' and x[i + 1] == 'U' and (x[i + 2] == 'B'):
		if c != 1:
			print('', end=' ')
		c = 1
		i += 3
	else:
		print(x[i], end='')
		c = 0
		i += 1
if i < len(x) - 1:
	print(x[i], end='')
	print(x[i + 1], end='')
elif i == len(x) - 1:
	print(x[i], end='')


import re
djmix = input()
djmix = djmix.replace('WUB', ' ')
lyrics = re.split(' +', djmix)
song = list(filter(lambda y: y != '', lyrics))
print(' '.join(song))


import re
l = input()
l = l.replace('WUB', ' ')
p = []
p = l.split()
print(' '.join(p))


x = input()
n = x.split('WUB')
for i in range(0, len(n)):
	if n[i] != '':
		print(n[i], end='')
		if i < len(n) - 1:
			print(' ', end='')


s = input()
a = s.split('WUB')
l = []
b = 1
for i in range(0, len(a)):
	if a[i] == ' ':
		l.append(i)
		b += 1
	if a[i] == '':
		l.append(i)
		b += 1
l.reverse()
for i in range(0, len(l)):
	del a[l[i]]
for i in range(0, len(a) - 1):
	a[i] = a[i] + ' '
a = ''.join(a)
print(a)


s = input()
l = []
i = 0
t = ''
while i < len(s) - 3:
	if s[i:i + 3] == 'WUB':
		i = i + 3
		if len(t):
			l.append(t)
		t = ''
	else:
		t = t + s[i]
		i = i + 1
if len(t):
	if s[i - len(t):i] == t:
		if s[i:] != 'WUB':
			t = t + s[i:]
			i = len(s)
	l.append(t)
if i != len(s) and s[i:] != 'WUB':
	t = s[i:]
	l.append(t)
print(' '.join(l))


from sys import stdin, stdout
import bisect

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
			n = n - 1
		else:
			a = a * a
			n = n >> 1
	return r

def solve():
	s = st()
	a = ['W', 'U', 'B']
	l = []
	if s[len(s) - 3:] == a:
		p = len(s) - 2
		i = 0
		while i < p:
			if s[i:i + 3] == a:
				i += 3
			else:
				x = ''
				while i < p:
					if s[i:i + 3] == a:
						break
					else:
						x += s[i]
					i += 1
				l.append(x)
		print(*l)
	else:
		p = len(s)
		i = 0
		while i < p:
			if i + 3 < p:
				if s[i:i + 3] == a:
					i += 3
				else:
					x = ''
					while i < p:
						if s[i:i + 3] == a:
							break
						else:
							x += s[i]
						i += 1
					l.append(x)
			else:
				l.append(''.join(s[i:]))
				break
		print(*l)
for _ in range(1):
	solve()


import re
s = input()
s = s.replace('WUB', ' ').strip()
s = s.split()
for i in s:
	print(i, end=' ')


ch = input()
l = ch.split('WUB')
ch1 = ''
for i in l:
	if i != '':
		ch1 = ch1 + i + ' '
print(ch1)


str = input()
n = len(str)
str = str.upper()
x = []
if n < 3:
	print(str)
else:
	for i in range(0, n - 2):
		if str[i] == 'W' and str[i + 1] == 'U' and (str[i + 2] == 'B'):
			x.append(i)
	word = ''
	current = 0
	sen = []
	while current <= n:
		if current in x or current == n:
			current += 3
			sen.append(word)
			word = ''
		else:
			word += str[current]
			current += 1
	for y in sen:
		if y != '':
			print(y, end=' ')


ok = input().split('WUB')
a = []
for i in ok:
	if i != '':
		a.append(i)
print(*a)


string = input()
liste = string.split('WUB')
string = ''
for i in range(len(liste)):
	string += liste[i]
	if liste[i] != '':
		string += ' '
print(string)


remix = input()
remix = remix.split('WUB')
for i in remix:
	if i != '':
		print(i, end=' ')


lis = []
s = input()
i = 0
c = 'WUB'
n = len(s)
while i < n:
	if s[i:i + 3] == c:
		i += 3
	else:
		d = i
		while s[i:i + 3] != c and i < n:
			i += 1
		lis.append(s[d:i])
print(*lis)


string = input('')
song = str()
i = 0
wub_cnt = 0
length = len(string)
while i < length - 2:
	if string[i] == 'W' and string[i + 1] == 'U' and (string[i + 2] == 'B'):
		i = i + 3
		wub_cnt = wub_cnt + 1
		if wub_cnt == 1:
			song = song + ' '
	else:
		song = song + string[i]
		i = i + 1
		wub_cnt = 0
if i != length:
	song = song + string[i:]
song = song.strip()
print(song)


string1 = ''
string = input()
i = 0
shart = True
while i < len(string):
	if string[i:i + 3] == 'WUB':
		i = i + 3
		if shart:
			string1 = string1 + ' '
			shart = False
	else:
		string1 = string1 + string[i]
		i = i + 1
		shart = True
if not string[i:] == 'WUB':
	string1 = string1 + string[i:]
if string1[0:1] == ' ':
	print(string1[1:])
else:
	print(string1)


s = list(input().split('WUB'))
t = []
for c in s:
	if c != '':
		t.append(c)
print(' '.join(t))


n = list(input())
i = 0
s = ''
while i < len(n):
	if n[i:i + 3] == ['W', 'U', 'B']:
		n.pop(i + 2)
		n.pop(i + 1)
		if i == 0 or n[i - 1] == ' ':
			n.pop(i)
		else:
			n[i] = ' '
			i += 1
	else:
		i += 1
if n[-1] == ' ':
	n.pop(-1)
for i in n:
	s += i
print(s)


def solve_the_problem():
	substep_song = input()
	spited_words = substep_song.split('WUB')
	result = ''
	for i in spited_words:
		if i != '':
			result += i
			result += ' '
	print(result[:-1])
solve_the_problem()


s = input().split('WUB')
s1 = ''
for i in s:
	if i:
		s1 += i + ' '
print(s1)


dubs = input()
song = []
for i in dubs:
	song.append(i)
for j in range(len(song) - 2):
	if song[j] == 'W' and song[j + 1] == 'U' and (song[j + 2] == 'B'):
		song[j] = ' '
		song[j + 1] = ' '
		song[j + 2] = ' '
	else:
		continue
original_song = ''
count = 0
for k in song:
	if k == ' ' and count == 0:
		original_song += k
		count += 1
	elif k != ' ':
		original_song += k
		count = 0
	else:
		continue
original_song = original_song.lstrip()
print(original_song)


data = input()
word = ' '
index_ = 0
wub = False
while index_ < len(data):
	if data[index_:index_ + 3] != 'WUB':
		word += data[index_]
		index_ += 1
		wub = False
	else:
		word += ' ' if word[-1] != ' ' else ''
		index_ += 3
		wub = True
print(word[1:])


s = input().split('WUB')
result = ''
for item in s:
	if item != '':
		result += item + ' '
print(result)


s = input().split('WUB')
c = [string for string in s if string != '']
print(' '.join(c))


import re
print(re.sub('\\s+', ' ', input().replace('WUB', ' ').lstrip()))


def fun(s):
	temp = ' '
	i = 0
	while i < len(s):
		if s[i:3 + i] != 'WUB':
			temp += s[i]
			i += 1
		else:
			if temp[-1] != ' ':
				temp += ' '
			else:
				temp += ''
			i += 3
	print(temp.strip())
s = input()
fun(s)


comp = input()
add = 'WUB'
word = ''
while add in comp:
	a = comp.split(add)
	comp = ' '.join(a)
original = comp.split()
print(*original)


mixed_string = input().split('WUB')
mixed_string = [value for value in mixed_string if value != '']
print(' '.join(mixed_string))


string = input()
x = string.split('WUB')
ans = []
for i in x:
	if i != '':
		ans.append(i)
for i in ans:
	print(i, end=' ')


word = input()
word_list = list(map(str, word.split('WUB')))
final = ''
disco = ''
final_list = []
for i in range(len(word_list)):
	if word_list[i]:
		final += word_list[i] + ' '
		final_list.append(word_list[i])
disco = final[0:len(final) - 1]
print(disco)


print(' '.join(filter(lambda x: len(x) > 0, input().split('WUB'))))


s = input()
flag = False
i = 0
while i < len(s):
	if s[i:i + 3] == 'WUB':
		if flag:
			print(' ', end='')
			flag = False
		i += 3
	else:
		flag = True
		print(s[i], end='')
		i += 1


s = input()
s = s.split('WUB')
first = True
for i in s:
	if len(i) > 0:
		if not first:
			print(' ', end='')
		first = False
		print(i, end='')
print()


x = input()
list1 = x.split('WUB')
list2 = []
for item in list1:
	if item != '':
		list2.append(item)
print(' '.join(list2))


s = input().split('WUB')
x = ''
for i in range(len(s)):
	if s[i] != '':
		x += s[i] + ' '
print(x)


a = input().split('WUB')
b = []
for i in range(0, len(a)):
	if a[i] != '':
		b.append(a[i])
for i in range(0, len(b)):
	print(b[i], end=' ')
print()


print(*[s for s in input().split('WUB') if len(s)])


s = input()
t = ''
while s.count('WUB') != 0:
	if s.find('WUB') == 0:
		s = s[3:]
	else:
		t = t + s[0:s.find('WUB')] + ' '
		s = s[s.find('WUB'):]
print(t + s)


dubstep = input()
dubstep = dubstep.replace('WUB', ' ')
for dub in dubstep.split():
	print(dub, end=' ')


s = str(input())
print(' '.join([i for i in s.split('WUB') if i != '']))


s = input()
s = s.replace('WUB', ' ')
r = ' '.join(s.split())
print(str(r))


import re
A = input()
r = re.compile('WUB')
A = r.sub(' ', A)
A = A.split()
for word in A:
	print(word, end=' ')


input_list = []
num = 0
while True:
	if num == 1:
		break
	line = input()
	num += 1
ilist = list(line)
for i in range(line.count('WUB')):
	ind = line.find('WUB')
	for x in range(3):
		ilist.pop(ind)
	if ind != 0 and ilist[ind - 1] != ' ':
		ilist.insert(ind, ' ')
	line = ''.join(ilist)
print(line)


s = input()
i = s.find('WUB')
while i >= 0:
	if i != 0 and i != -1:
		print(s[:i], end=' ')
	if i >= 0:
		s = s[i + 3:]
	i = s.find('WUB')
if i == -1:
	print(s)


a = input().split('WUB')
res = ''
f = True
for (i, k) in enumerate(a):
	if k != '':
		if not f:
			res += ' '
		else:
			f = False
		res += k
print(res)


def dub(s):
	l = []
	while len(s) != 0:
		a = s.find('WUB')
		if a == 0:
			s = s[3:]
		elif a == -1:
			l.append(s)
			s = ''
		else:
			l.append(s[:a])
			s = s[a + 3:]
	for i in range(0, len(l)):
		print(l[i], end=' ')
s = input()
dub(s)


string = input()
string = string.replace('WUB', ' ')
string = string.split(' ')
while '' in string:
	string.remove('')
string = ' '.join(string)
print(string)


s = input()
while 'WUB' in s:
	s = s.replace('WUB', ' ')
s = list(s.split(' '))
ans = ''
for i in s:
	if len(i) > 0:
		ans += ' ' + i
if ans[0] == ' ':
	ans = ans[1:]
print(ans)


s = input()
s = s.replace('WUB', ' ')
for i in range(len(s)):
	if s[i] == ' ':
		if i == 0:
			continue
		elif s[i - 1] != ' ':
			print(s[i], end='')
	else:
		print(s[i], end='')


import re
s = input()
x = s.replace('WUB', ' ')
print(re.sub(' +', ' ', x))


def listTOString(s):
	string = ''
	flag = 0
	for i in s:
		if i == '':
			continue
		else:
			string += i + ' '
			flag = 1
	return string
n = input()
list = n.split('WUB')
ans = listTOString(list)
print(ans)


song = input().split('WUB')
for i in song:
	if i != '':
		print(i, end=' ')


import re
import sys
sentence = input()
substr = 'WUB'
res = [i for i in range(len(sentence)) if sentence.startswith(substr, i)]
new_s = ''
if len(res) == 0:
	print(sentence)
	sys.exit(0)
if res[0] != 0:
	new_s = new_s + sentence[0:res[0]] + ' '
for i in range(len(res) - 1):
	hand = sentence[res[i] + 3:res[i + 1]]
	if len(hand) < 1:
		continue
	else:
		new_s = new_s + hand + ' '
if len(sentence) != res[-1] + 3:
	new_s = new_s + sentence[res[-1] + 3:]
print(new_s)


string = input()
list1 = string.split('WUB')
list2 = []
for i in range(len(list1)):
	if list1[i] != '':
		list2.append(list1[i])
string2 = ' '.join(list2)
print(string2)


s = input().split('WUB')
res = ''
for word in s:
	if res == '' and word != '':
		res = word
	elif word != '':
		res += ' ' + word
print(res)


remix = input()
words = remix.split('WUB')
words = list(filter(None, words))
print(' '.join(words))


p = list(input())
q = list('WUB')
for i in range(len(p)):
	if i + 2 < len(p) and q == p[i:i + 3]:
		p[i] = p[i + 1] = p[i + 2] = '.'
for i in range(len(p)):
	if i != 0 and p[i] == '.' and (p[i - 1] != '.'):
		print(' ', end='')
	if p[i] != '.':
		print(p[i], end='')


S = input().split('WUB')
l = [x for x in S if x != '']
print(*l)


a = input()
a = list(map(str, a.split('WUB')))
for i in range(len(a)):
	if a[i] == '':
		continue
	if i == len(a) - 1:
		print(a[i])
	else:
		print(a[i], end=' ')


words = input().split('WUB')
wr = []
for i in words:
	if i != '':
		wr.append(i)
print(' '.join(map(str, wr)))


import math
st = ''

def func(s):
	p = s.split(sep='WUB')
	s = ''
	for i in p:
		if i != '':
			s += i + ' '
	return s[:-1]
for _ in range(1):
	l1 = []
	s = input()
	st += str(func(s)) + '\n'
print(st)


def prob298a(x):
	aList = x.split('WUB')
	finalList = []
	for i in range(len(aList)):
		if aList[i] != '':
			finalList.append(aList[i])
	return ' '.join((x for x in finalList))
x = input()
print(prob298a(x))


a = input().split('WUB')
m = []
for i in range(0, len(a)):
	if len(a[i]) >= 1:
		m.append(a[i])
print(' '.join(m))


import re
s = input()
x = re.split('WUB', s)
x = [i for i in x if i != '' and i != 'WUB']
print(' '.join(x))


import re
song = input()
song_new = song.replace('WUB', ' ').strip()
fin = re.sub(' +', ' ', song_new)
print(fin)


a = input().strip()
i = 0
x = []
c = 1
while i < len(a):
	if a[i:i + 3] == 'WUB':
		i = i + 3
		if c == 0:
			x.append(' ')
			c = 1
	else:
		c = 0
		x.append(a[i])
		i = i + 1
print(''.join(x))


l = list(map(str, input().split('WUB')))
l1 = []
for i in l:
	if i != '':
		l1.append(i)
print(' '.join(l1))


n = input()
n = n.split('WUB')
s = ''
for i in n:
	if i != '':
		s = s + i + ' '
print(s)


a = input()
b = a.split('WUB')
s = ''
while True:
	if '' in b:
		b.remove('')
	else:
		break
for i in b:
	s += i + ' '
print(s)


def main():
	str = input()
	ans = ''
	ok = 0
	for i in range(len(str)):
		if 'WUB' in str[i:i + 3]:
			if len(ans) != 0 and ans[len(ans) - 1] != ' ':
				ans += ' '
			ok = 2
			i = i + 2
			continue
		if not ok:
			ans += str[i]
			continue
		ok -= 1
	print(ans)
main()


data = input()
output = data.replace('WUB', ' ')
output = ' '.join(output.split())
print(output)


print(' '.join((str(x) for x in input().split('WUB') if x != '')))


s = input().split('WUB')
for i in range(len(s)):
	if '' in s:
		s.remove('')
print(*s, sep=' ')


a = input().split('WUB')
while '' in a:
	a.remove('')
b = ' '.join(a)
print(b)


word = list(input())
real = list()
i = 0
lastWub = False
ending = 0
while len(word) > 0:
	if ending:
		break
	if len(word[i:]) >= 3 and word[i] == 'W' and (word[i + 1] == 'U') and (word[i + 2] == 'B'):
		word.pop(i)
		word.pop(i)
		word.pop(i)
		lastWub = True
	else:
		if lastWub:
			word.insert(i, ' ')
			lastWub = False
		if len(word[i:]) < 3:
			ending = 1
		i += 1
print(''.join(word))


string = input()
i = 0
result = ''
first = False
while i < len(string):
	if i > len(string) - 3:
		result += string[i:]
		break
	elif first and string[i:i + 3] == 'WUB':
		result += ' '
		i += 3
		first = False
	elif string[i:i + 3] == 'WUB':
		i += 3
	else:
		first = True
		result += string[i]
		i += 1
print(result)


remix = input()
song = [str(i) for i in remix.split('WUB')]
empty = song.count('')
for i in range(empty):
	song.remove('')
song2 = ' '.join(song)
print(song2)


s = tuple(input().split('WUB'))
ans = ''
for c in s:
	if '' != c:
		ans += c + ' '
print(ans[0:len(ans) - 1])


print(' '.join(map(str, input().replace('WUB', ' ').split())))


import re
s = input()
c = 'WUB'
s = re.sub(c, ' ', s)
print(' '.join(s.split()))


s = input()
n = len(s)
i = 0
string = ''
count = 0
while i < n:
	st = s[i:i + 3]
	if st == 'WUB':
		count += 1
		if count == 1:
			string = string + ' '
		i += 3
	else:
		count = 0
		string = string + s[i]
		i += 1
string = string.lstrip()
print(string)


a = str(input())
b = ''
cantidad = 0
while cantidad < len(a):
	if cantidad + 2 >= len(a):
		while cantidad < len(a):
			b = b + a[cantidad]
			cantidad += 1
	elif a[cantidad] == 'W' and a[cantidad + 1] == 'U' and (a[cantidad + 2] == 'B'):
		cantidad += 3
	else:
		while a[cantidad:cantidad + 3] != 'WUB' and cantidad < len(a):
			b += a[cantidad]
			cantidad += 1
		b += ' '
if b[len(b) - 1] == ' ':
	b = b[0:len(b) - 1]
print(b)


dubstep = input()
start_index = 0
song = ' '
while start_index <= len(dubstep) - 3:
	sub = dubstep[start_index:start_index + 3]
	if sub == 'WUB':
		if song[-1] != ' ':
			song += ' '
		start_index += 3
	else:
		song += dubstep[start_index]
		start_index += 1
song += dubstep[start_index:]
song = song.strip()
print(song)


s = input().split('WUB')
b = ''
for i in s:
	if not i == '':
		b = b + i + ' '
print(b)


print(' '.join([w for w in input().split('WUB') if len(w) > 0]))


ip = input()
while 'WUB' in ip:
	ip = ip.replace('WUB', '*')
ip = ip.split('*')
ans = ''
for i in ip:
	if not i.isupper():
		pass
	else:
		ans += i + ' '
print(ans)


remix = input()
s = []
if remix[:3] != 'WUB':
	for i in range(len(remix) - 2):
		if remix[i:i + 3] == 'WUB':
			print(remix[:i], end=' ')
			break
for i in range(2, len(remix) - 2):
	for j in range(i + 1, len(remix) + 1):
		if remix[i - 2:i + 1] == 'WUB' and remix[j:j + 3] == 'WUB':
			if i != j - 1:
				print(remix[i + 1:j], end=' ')
				break
			else:
				break
if remix[-3:] != 'WUB':
	for i in range(len(remix) - 1, 0, -1):
		if remix[i - 2:i + 1] == 'WUB':
			print(remix[i + 1:], end=' ')
			break
flag = True
for i in range(len(remix) - 2):
	if remix[i:i + 3] == 'WUB':
		flag = False
if flag:
	print(remix)


L = input().split('WUB')
str1 = ''
for i in L:
	if i != '':
		str1 += i
		str1 += ' '
print(str1)


s = input().split(sep='WUB')
s = filter(lambda x: x != '', s)
print(' '.join(list(s)))


n = input()
n = n.split('WUB')
for i in n:
	if i == '':
		continue
	else:
		print(i, end=' ')


text = input()
n = len(text)
i = 0
begin = 1
previous_space = 0
while i < n:
	if i + 2 >= n:
		print(text[i:len(text)])
		i += 2
	elif text[i] == 'W' and text[i + 1] == 'U' and (text[i + 2] == 'B'):
		if begin != 1 and previous_space == 0 and (i + 3 < n):
			print(' ', end='')
			begin = 0
			previous_space = 1
		i += 3
	else:
		print(text[i], end='')
		begin = 0
		i += 1
		previous_space = 0


t = input().split('WUB')
g = ''
for i in t:
	if i != '':
		g = g + i + ' '
print(g[:-1])


st = input().split('WUB')
li1 = []
for i in range(len(st)):
	if st[i] != '':
		li1.append(st[i])
for i in li1:
	print(i, end=' ')


s = input()
ans = []
if 'WUB' in s:
	while 'WUB' in s:
		a = s.index('WUB')
		if a != 0:
			ans.append(s[0:a])
		s = s[a + 3:]
	ans.append(s)
	for i in ans:
		print(i, end=' ')
else:
	print(s)


a = input()
s = a.split('WUB')
print(' '.join(filter(bool, s)))


import re
s = input()
y = ' '.join(re.sub('WUB', ' ', s).split())
print(y)


dubstep = input().split('WUB')
newdubstep = []
for i in dubstep:
	if i != '':
		newdubstep.append(i)
for i in newdubstep:
	print(i, end=' ')


inp = [str(i) for i in input().split('WUB')]
str_b = ''
for i in inp:
	if i == '':
		continue
	else:
		str_b += i + ' '
print(str_b)


import re
s = input()
g = re.sub('WUB', ' ', s).split()
print(' '.join(g))


s = list(input())
step = ['W', 'U', 'B']
leng = len(s)
i = 0
while i < leng:
	if s[i:i + 3] == step:
		s[i] = -1
		s[i + 1] = -1
		s[i + 2] = -1
		i += 3
	else:
		i += 1
res = ''
leng = 0
for i in s:
	if i == -1 and leng != 0:
		if res[leng - 1] != ' ':
			res += ' '
			leng += 1
	elif i != -1:
		res += i
		leng += 1
print(res)


n = input().split('WUB')
for i in n:
	if len(i) >= 1:
		print(i, end=' ')


s = input()
l = s.split('WUB')
for i in l:
	if i == '':
		continue
	else:
		print(i, end=' ')


s = list(input())
n = len(s)
i = 0
k = []
while True:
	if len(s) == 0:
		break
	if len(s) >= 3 and [s[0], s[1], s[2]] == ['W', 'U', 'B']:
		s.remove(s[0])
		s.remove(s[0])
		s.remove(s[0])
		k.append(' ')
	else:
		k.append(s[0])
		s.remove(s[0])
while True:
	if k[0] == ' ':
		k.remove(k[0])
	else:
		break
n = len(k)
nk = []
cnt = 0
for i in range(n):
	if k[i] == ' ':
		cnt += 1
	if k[i] != ' ':
		if cnt != 0:
			nk.append(' ')
			nk.append(k[i])
			cnt = 0
		else:
			nk.append(k[i])
print(''.join(nk))


s = input()
s = s.split('WUB')
for i in s:
	if len(i) >= 1:
		print(i, end=' ')


import re
str_in = input().strip()
list_in = re.sub('(WUB)+', '|', str_in).strip('|').replace('|', ' ')
print(list_in)


s = input().split('WUB')
lst = []
for i in s:
	if i == '':
		continue
	else:
		lst.append(i)
print(' '.join(lst))


li_ = input()
t = ' '
while len(li_) >= 3:
	if li_[0] == 'W' and li_[1] == 'U' and (li_[2] == 'B'):
		li_ = li_[3:]
		if t[-1] != ' ':
			t += ' '
	else:
		t += li_[0]
		li_ = li_[1:]
t += li_
t = t[1:]
if t[-1] == ' ':
	t = t[:-1]
print(t)


from sys import stdin, stdout
s = stdin.readline().strip()
li = []
f = 0
i = 0
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i += 3
		f = 1
	else:
		if f == 1:
			li.append(' ')
		li.append(s[i])
		i += 1
		f = 0
if li[0] == ' ':
	print(''.join(li[1:]))
else:
	print(''.join(li))


song = input()
new = song.replace('WUB', ' ').strip()
new = new.split()
print(' '.join(new))


inp = input()
print(' '.join([x for x in inp.split('WUB') if x != '']))


s = input()
r = s.replace('WUB', ',')
f = ''
l = []
for i in range(len(r)):
	if r[i] != ',':
		f = f + r[i]
	else:
		l.append(f)
		f = ''
l.append(f)
for i in l:
	if len(i) != 0:
		print(i, end=' ')


def main():
	s = []
	r = input().replace('WUB', ' ')
	r = r.split(' ')
	for c in r:
		if c != '':
			s.append(c)
	print(' '.join(s))
main()


s = input()
list1 = s.split('WUB')
for i in list1:
	if i != '':
		print(i, end=' ')


s = input()
list1 = []
k = s.split('WUB')
for i in k:
	if i != '':
		list1.append(i)
print(' '.join(list1))


li = input().split('WUB')
li[:] = (value for value in li if value != '')
print(' '.join(li))


import math
import os
import sys
import re
import itertools
import functools
import operator
print(' '.join(input().replace('WUB', ' ').split()))


song = input()
stores = []
i = 2
while i < len(song):
	if song[i - 2] == 'W' and song[i - 1] == 'U' and (song[i] == 'B'):
		stores.append(i - 2)
		stores.append(i - 1)
		stores.append(i)
	i += 1
res = ''
for i in range(len(song)):
	if i not in stores:
		res += song[i]
		if i < len(song) and i + 1 in stores:
			res += ' '
print(res)


z = input().split('WUB')
for i in z:
	if i != '':
		print(i, end=' ')


def l(a):
	for b in ['WUB', '  ']:
		a = a.replace(b, ' ')
	return a
w = input()
while w != l(w):
	w = l(w)
print(w.strip())


data = input()
li = data.split('WUB')
while '' in li:
	li.remove('')
for ele in li:
	print(ele, end=' ')


ch = str(input())
n = len(ch)
r = ''
k = 0
l = 0
while k < n - 2:
	if ch[k:k + 3] == 'WUB':
		r = r + ch[l:k]
		if l < k:
			r = r + ' '
		k += 3
		l = k
	else:
		k += 1
print(r + ch[l:])


t = input()
while 'WUB' in t:
	t = t.replace('WUB', ' ')
t = t.strip()
while '  ' in t:
	t = t.replace('  ', ' ')
print(t)


song = input()
song = song.split('WUB')
for x in song:
	if x != '':
		print(x, end=' ')


w = str(input())
while w.find('WUB') != -1:
	if w.find('WUB') == 0:
		w = w[3:]
	elif w.find('WUB') == -3:
		w = w[:-3]
	elif w[w.find('WUB') - 1] == ' ':
		w = w[:w.find('WUB')] + w[w.find('WUB') + 3:]
	else:
		w = w[:w.find('WUB')] + ' ' + w[w.find('WUB') + 3:]
print(w)


s = input()
slen = len(s)
key = 'WUB'
keylen = len(key)
ans = ''
i = 0
while i < slen:
	char = s[i]
	add = True
	if char == key[0]:
		if i <= slen - keylen:
			if s[i:i + keylen] == key:
				add = False
				while s[i:i + keylen] == key:
					i += keylen
	if add:
		ans += char
		i += 1
	else:
		ans += ' '
print(ans.strip(' ').rstrip(' '))


song = input()
idx = song.find('WUB')
while idx >= 0:
	song = song[:idx] + ' ' + song[idx + 3:]
	idx = song.find('WUB')
idx = song.find('  ')
while idx >= 0:
	song = song[:idx] + ' ' + song[idx + 2:]
	idx = song.find('  ')
print(song.strip())


n = 'WUB'
m = input()
lists = m.split(n)
a = ''
for x in lists:
	if x != '':
		a += x + ' '
a.strip()
print(a)


s = input().strip()
arr = list(map(str, s.split('WUB')))
for i in arr:
	if i != '':
		print(i, end=' ')


s = input()
storage = []
afterwub = False
started = False
i = 0
while i < len(s):
	if s[i] == 'W' and len(storage) == 0:
		storage.append(s[i])
	elif s[i] == 'U' and len(storage) == 1:
		storage.append(s[i])
	elif s[i] == 'B' and len(storage) == 2:
		storage = []
		afterwub = True
	else:
		if afterwub and started:
			afterwub = False
			print(' ', end='')
		if len(storage) > 0:
			for j in storage:
				print(j, end='')
			storage = []
			i -= 1
			started = True
			afterwub = False
		else:
			print(s[i], end='')
			started = True
			afterwub = False
	i += 1
if storage:
	if afterwub:
		print(' ', end='')
	for i in storage:
		print(i, end='')


a = list(map(str, input().split('WUB')))
x = []
for i in range(len(a)):
	if a[i] != '':
		x.append(a[i])
for i in range(len(x)):
	print(x[i], end=' ')


def dubStep(s):
	a = 'WUB'
	while a in s:
		s = s.replace(a, ' ')
	l = s.split()
	return ' '.join(l)
n = input()
print(dubStep(n))


song = input()
a = song.replace('WUB', ' ').strip()
song_out = a[0]
for i in range(1, len(a)):
	if a[i - 1] == ' ' and a[i] == ' ':
		song_out = song_out
	else:
		song_out += a[i]
print(song_out)


s = input()
l = list(s)
l.extend(['', '', ''])
while s.find('WUB') >= 0:
	a = s.find('WUB')
	while l[a + 3] == 'W' and l[a + 4] == 'U' and (l[a + 5] == 'B'):
		l.pop(a)
		l.pop(a)
		l.pop(a)
		s = ''.join(l)
		a = s.find('WUB')
	if a == len(s) - 3 or a == 0:
		l.pop(a)
		l.pop(a)
		l.pop(a)
	else:
		l.pop(a)
		l.pop(a)
		l[a] = ' '
	s = ''.join(l)
print(s)


n = input()
i = 0
while i < len(n):
	if n[i:i + 3] == 'WUB':
		n = n[:i] + ' ' + n[i + 3:]
		i -= 1
	i += 1
g = list(n.split())
for i in g:
	print(i, end=' ')


import re
n = input()
o = n.replace('WUB', ' ')
o = re.sub(' +', ' ', o)
print(o.strip())


m = input().replace('WUB', ' ')
m.strip()
print(' '.join(m.split()))


dupstep = input()
original = dupstep.replace('WUB', ' ').strip()
while original.find('  ') != -1:
	original = original.replace('  ', ' ')
print(original)


import os
import sys
from io import BytesIO, IOBase

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True
s = input()
s = s + '!!!!!!!!!!!!!!!!!!'
ind = 0
ans = ''
for c in s:
	if s[ind:ind + 3] == 'WUB':
		ind += 3
	elif s[ind:ind + 3] != 'WUB' and s[ind + 1:ind + 4] == 'WUB':
		ans = ans + s[ind] + ' '
		ind += 1
	elif s[ind:ind + 3] == '!!!':
		break
	else:
		ans = ans + s[ind]
		ind += 1
print(ans)


a = input().split('WUB')
check = False
for i in a:
	if i != '':
		print(i, end=' ')


import re
s = re.sub('WUB', ' ', input())
i = 0
while s[i] == ' ':
	i += 1
s = s[i:]
print(re.sub('[ ]+', ' ', s))


a = input().split('WUB')
w = ''
for i in range(a.count('')):
	a.remove('')
for i in range(len(a) - 1):
	w += a[i] + ' '
print(w + a[-1])


print(' '.join(list(filter(None, [i for i in input().split('WUB')]))))


for i in input().split('WUB'):
	print(i, end=[' ', ''][i == ''])


def song_decoder(song):
	return ' '.join(song.replace('WUB', ' ').split())
string = input()
ans = song_decoder(string)
print(ans)


import re
print(' '.join([i for i in re.split('WUB', input()) if i != '']))


s = [x for x in input().split('WUB') if x != '']
for y in s:
	print(y, end=' ')


import re

def original(remix):
	remix = re.sub('(WUB)+', ' ', remix)
	return remix.strip()
remix = input()
print(original(remix))


s = input()
s1 = ''
l = s.split('WUB')
l2 = []
for i in l:
	if i != '':
		s1 = s1 + i + ' '
		s2 = s1
print(s2)


remix = input()
remix += 'WUB'
i = 0
l = []
while i < len(remix) - 2:
	if remix[i] == 'W' and remix[i + 1] == 'U' and (remix[i + 2] == 'B'):
		i += 3
	else:
		j = i
		temp = ''
		while remix[j] != 'W' or remix[j + 1] != 'U' or remix[j + 2] != 'B':
			temp += remix[j]
			j += 1
		l.append(temp)
		i = j
for i in range(len(l)):
	print(l[i], end=' ')


def main():
	s = input()
	s = s.replace('WUB', ' ')
	a = s.split()
	print(' '.join(a))
main()


import re
pat = re.compile('(?:WUB)+')
s = input()
f = re.sub(pat, ' ', s).strip()
print(f)


z = input()
arr = []
i = 0
while i < len(z):
	if i >= len(z) - 2:
		arr.append(z[i])
		i += 1
	elif z[i] == 'W':
		if z[i + 1] == 'U':
			if z[i + 2] == 'B':
				i += 3
				if len(arr) == 0:
					continue
				elif arr[-1] == ' ':
					continue
				else:
					arr.append(' ')
					continue
			else:
				arr.append(z[i])
				arr.append(z[i + 1])
				i += 2
				continue
		else:
			arr.append(z[i])
			i += 1
			continue
	else:
		arr.append(z[i])
		i += 1
		continue
for i in range(len(arr)):
	print(arr[i], end='')


string = input()
string = string.replace('WUB', ' ')
string_list = string.split()
print(' '.join(string_list))


import re
t = input()
t = t.replace('WUB', ' ')
t = re.sub(' +', ' ', t)
print(*t.split())


start = list(input())
out = ''
trigger = 0
for i in range(0, len(start) - 2):
	if start[i] == 'W' and start[i + 1] == 'U' and (start[i + 2] == 'B'):
		start[i] = ''
		start[i + 1] = ''
		start[i + 2] = ''
for i in range(0, len(start)):
	out = out + start[i]
	if start[i] != '':
		trigger = 1
	if start[i] == '' and trigger == 1:
		out = out + ' '
		trigger = 0
print(out)


import re
a = input()
a = re.sub('WUB', ' ', a).split()
print(' '.join(a))


from sys import stdin
import re
x = stdin.readline().rstrip()
x = x.replace('WUB', ' ').strip()
x = re.sub('\\s+', ' ', x)
print(x)


remixed = input()
remixed = remixed.replace('WUB', ' ')
print(' '.join(remixed.split()))


s = list(input())
a = len(s)
for i in range(a):
	if s[i:i + 3] == ['W', 'U', 'B']:
		s[i] = ' '
		s[i + 1] = ' '
		s[i + 2] = ' '
while 1:
	if s[0] == ' ':
		s.pop(0)
	else:
		break
while 1:
	if s[-1] == ' ':
		s.pop()
	else:
		break
li = []
i = 0
while i < len(s):
	li.append(s[i])
	if s[i] == ' ':
		while s[i + 1] == ' ':
			i += 1
	i += 1
for i in li:
	print(i, end='')


s = input()
j = len(s)
k = s.replace('WUB', ' ')
if k[0] != ' ':
	k = k.replace('            ', ' ')
	k = k.replace('           ', ' ')
	k = k.replace('          ', ' ')
	k = k.replace('         ', ' ')
	k = k.replace('        ', ' ')
	k = k.replace('       ', ' ')
	k = k.replace('      ', ' ')
	k = k.replace('     ', ' ')
	k = k.replace('    ', ' ')
	k = k.replace('   ', ' ')
	k = k.replace('  ', ' ')
	print(k)
if k[0] == ' ':
	k = k.replace('            ', ' ')
	k = k.replace('           ', ' ')
	k = k.replace('          ', ' ')
	k = k.replace('         ', ' ')
	k = k.replace('        ', ' ')
	k = k.replace('       ', ' ')
	k = k.replace('      ', ' ')
	k = k.replace('     ', ' ')
	k = k.replace('    ', ' ')
	k = k.replace('   ', ' ')
	k = k.replace('  ', ' ')
	j = len(k)
	l = k[1:j]
	print(l)


dubstep = input()
song = dubstep.split('WUB')
song = list(filter(None, song))
string = ' '
print(string.join(song))


s = 'WUB' + input() + 'WUB'
a = []
i = 0
while i < len(s):
	k = s.find('WUB', i)
	if k != -1:
		a.append(k)
		i = k + 3
	else:
		break
d = ''
for i in range(len(a) - 1):
	x = a[i]
	y = a[i + 1]
	if y - x > 3:
		d = d + s[x + 3:y] + ' '
d = d[:-1]
print(d)


import sys
from sys import stdin, stdout
import math
import random
import heapq
from collections import Counter
from functools import lru_cache
try:
	for _ in range(1):
		s = list(input().split('WUB'))
		ans = ''
		for i in s:
			ans += i
			if len(i) > 0:
				ans += ' '
		print(ans)
except EOFError as e:
	print(e)


s = input()
s = s.replace('WUB', '/')
result = ''
for i in range(len(s)):
	if s[i] != '/':
		result += s[i]
		try:
			if s[i + 1] == '/':
				result += ' '
		except:
			break
print(result)


n = input()
l = []
l = n.split('WUB')
for j in range(len(l)):
	if l[j] != '':
		print(l[j] + ' ', end='')


a = input()
i = 0
b = ''
c = ''
while i < len(a) - 2:
	if a[i:i + 3] == 'WUB':
		i += 3
		if b != '':
			c += ' ' + b
			b = ''
	else:
		b += a[i]
		i += 1
if b != '':
	c += ' ' + b + a[i:]
	i = len(a)
if i != len(a):
	c += ' ' + a[i:]
print(c[1:])


s = list(input())
i = 0
L = []
cnt = 0
while i < len(s):
	if ''.join(s[i:i + 3]) == 'WUB':
		i = i + 3
		cnt += 1
	else:
		if len(L) == 0:
			L.append(s[i])
			cnt = 0
		else:
			if cnt > 0:
				L.append(' ')
			L.append(s[i])
			cnt = 0
		i += 1
print(''.join(L))


a = input()
while 'WUB' in a:
	n = a.index('WUB')
	a = a[:n] + ' ' + a[n + 3:]
b = a.split()
s = ''
for i in b:
	s += i + ' '
print(s)


split = list(input().split('WUB'))
res = ''
for w in split:
	if w == '':
		continue
	res += w + ' '
print(res.strip())


s = ' '.join([str(x) for x in input().split('WUB')])
print(' '.join(s.split()))


x = input().split('WUB')
ans = ''
for x in x:
	if x:
		ans += f'{x} '
print(ans)


st = input()
n = len(st)
l = []
temp = ''
i = 0
while i < n:
	if i + 2 < n and st[i] == 'W' and (st[i + 1] == 'U') and (st[i + 2] == 'B'):
		i += 3
		if temp != '':
			l.append(temp)
			temp = ''
	else:
		temp += str(st[i])
		i += 1
if temp != '':
	l.append(temp)
anss = ''
for ss in l:
	anss += ss
	anss += ' '
print(anss)


song = input()
l = len(song)
p = 0
original_song = ''
w = 0
i = 0
while i < l:
	if song[i:i + 3] == 'WUB':
		i += 3
		w = 1
	else:
		if w == 1 and p != 0:
			w = 0
			original_song += ' '
		elif w == 1 and p == 0:
			w = 0
		original_song += song[i]
		p = 1
		i += 1
print(original_song)


def seperateints(x):
	k = ''
	l = []
	for i in x:
		if i == ' ':
			l.append(int(k))
			k = ''
			continue
		k = k + i
	l.append(int(k))
	return l

def luckynum(x):
	for i in x:
		if i != '4' and i != '7':
			return False
	return True
x = input()
i = 0
kk = ''
s = 0
l = []
while i < len(x):
	if x[i:i + 3] == 'WUB' and i + 2 < len(x):
		i = i + 3
		l.append(kk)
		kk = ''
	else:
		kk = kk + x[i]
		i += 1
l.append(kk)
kk = ''
for i in range(len(l)):
	if i == len(l) - 1:
		kk = kk + l[i]
		break
	if l[i] != '':
		kk = kk + l[i] + ' '
print(kk)


import re
s = input()
q = re.sub('(WUB)+', ' ', s)
print(q.strip())


import re
s = input()
ans = re.sub('WUB', ' ', s)
print(re.sub(' +', ' ', ans))


def remove_values_from_list(the_list, val):
	return [value for value in the_list if value != val]
n = input()
m = n.replace('WUB', ' ')
m = m.replace('    ', ' ')
m = m.replace('   ', ' ')
m = m.replace('  ', ' ')
m = m.split(' ')
m = remove_values_from_list(m, ' ')
if m[0] == '':
	m.remove('')
	print(' '.join(m))
else:
	print(' '.join(m))


word = input().split('WUB')
new = []
for el in word:
	if el != '':
		new.append(el)
print(' '.join(new))


n = input().split('WUB')
m = n[:]
while '' in m:
	m.remove('')
print(' '.join(m))


s = input()
s = s.replace('WUB', ' ')
print(' '.join(filter(lambda x: bool(x), s.split(' '))))


n = input()
n = n.replace('WUB', ' ')
ans = []
flag = 1
for i in n:
	if i != ' ':
		ans.append(i)
		flag = 0
	elif i == ' ' and flag == 0:
		ans.append(' ')
		flag = 1
print(''.join(ans))


def remove_values_from_list(the_list, val):
	return [value for value in the_list if value != val]
s = input()
x = s.split('WUB')
x = remove_values_from_list(x, '')
for a in range(len(x)):
	print(x[a], end=' ')


n = input()
m = n.replace('WUB', ' ')
m.strip()
l = ' '.join(m.split())
print(l)


line = input()
song = line.split('WUB')
song = [x for x in song if x != '']
print(' '.join(song))


import re
s = input()
s = s.split('WUB')
print(' '.join([x for x in s if len(x) > 0]))


sen = input()
sen2 = sen.replace('WUB', ' ')
sen1 = [x for x in sen2.split()]
print(' '.join(sen1))


s = input().split('WUB')
for _ in range(s.count('')):
	s.remove('')
print(' '.join(s))


words = list(input().split('WUB'))
for i in range(0, words.count('')):
	words.remove('')
print(' '.join(words))


s = input().replace('WUB', ' ')
s = list(s)
i = 0
while s[i] == ' ':
	s[i] = '0'
	i += 1
i = len(s)
while s[i - 1] == ' ':
	s[i - 1] = '0'
	i -= 1
for i in range(1, len(s)):
	if s[i] == ' ' and s[i - 1] == ' ':
		s[i - 1] = '0'
print(''.join(s).replace('0', ''))


import re
s = input().strip()
s = re.sub('^((WUB)*)(.*?)(WUB)*$', '\\3', s)
s = re.sub('(WUB)+', ' ', s)
print(s)


a = input()
l = list(a.split('WUB'))
for i in l:
	if i != '':
		print(i, end=' ')


a = input().split('WUB')
b = []
for i in a:
	if i != '':
		b.append(i)
print(*b)


a = input().split('WUB')
b = ''
for i in a:
	if not i == '':
		b = b + i + ' '
print(b)


def readln():
	return tuple(map(int, input().split()))
print(' '.join([_ for _ in input().split('WUB') if _]))


str1 = input().split('WUB')
while '' in str1:
	str1.remove('')
print(' '.join(str1))


s = str(input())
s = s.replace('WUB', ' ')
sn = s.split(' ')
so = ''
for si in sn:
	if si != '':
		so += si + ' '
print(so)


remix = input()
wub = str()
song = str()
space = False
for r in remix:
	if r == 'W':
		if wub != '':
			song += wub
			space = False
		wub = r
	elif r == 'U':
		if wub != 'W':
			song += wub + r
			wub = ''
			space = False
		else:
			wub += r
	elif r == 'B':
		if wub != 'WU':
			song += wub + r
			wub = ''
			space = False
		else:
			if not space:
				song += ' '
			wub = ''
			space = True
	else:
		song += wub + r
		wub = ''
		space = False
if wub != 'WUB':
	song += wub
while song[0] == ' ':
	song = song[1:]
while song[-1] == ' ':
	song = song[:-1]
print(song)


s = input().split('WUB')
for e in s:
	if e != '' and e != '\r':
		print(e, end=' ')


import re

def dubstep():
	dubstep = re.sub(' +', ' ', input().replace('WUB', ' ').strip())
	print(dubstep)
dubstep()


s = input()
while True:
	if s[0:3] == 'WUB':
		s = s[3:]
	else:
		break
while True:
	if s[-3:] == 'WUB':
		s = s[0:-3]
	else:
		break
s = s.replace('WUB', ' ')
l = s.split()
ans = ''
for i in l:
	ans = ans + i + ' '
print(ans)


s = str(input())
a = s.split('WUB')
while '' in a:
	a.remove('')
print(' '.join(a))


song = str(input())
o_song = song.split('WUB')
for s in o_song:
	if s:
		print(s, end=' ')


k = input()
strasd = ''
i = 0
while i < len(k):
	if i + 2 < len(k) and k[i] == 'W' and (k[i + 1] == 'U') and (k[i + 2] == 'B'):
		i += 3
		if strasd != '' and strasd[-1] != ' ':
			strasd = strasd + ' '
		pass
	else:
		strasd = strasd + k[i]
		i += 1
print(strasd)


lyrics = input()
original = lyrics.split('WUB')
while '' in original:
	original.remove('')
for words in original:
	print(words, end=' ')


x = input()
print(' '.join(x.replace('WUB', ' ').split()))


def s1(s):
	s = s.split('WUB')
	list = []
	for i in s:
		if i != '':
			list = list + [i]
	return ' '.join(list)
s = input()
print(s1(s))


s = input()
arr = s.split('WUB')
retStr = ''
for i in arr:
	if not i == '':
		retStr += i + ' '
print(retStr[:-1])


import re
s = str(input())
s = re.sub('WUB', ' ', s)
s = re.sub(' +', ' ', s)
print(s)


x = input()
k = ' '
f = 0
for i in range(len(x)):
	if f > 0:
		f -= 1
		continue
	if i + 2 < len(x):
		if x[i] == 'W' and x[i + 1] == 'U' and (x[i + 2] == 'B'):
			if k[-1] != ' ':
				k = k + ' '
			f = 2
			continue
	k += x[i]
k = k.strip()
print(k)


import re
s = input()
pattern = 'WUB'
ans = re.split(pattern, s)
for i in ans:
	if len(i) != 0:
		print(i, end=' ')


n = input()
n = n.replace('WUB', ' ')
n = n.split()
print(' '.join(n))


str1 = input().strip()
words = str1.split('WUB')
lyrics = ''
for word in words:
	if word != '':
		lyrics += word + ' '
print(lyrics.strip())


li = input().split('WUB')
for i in range(len(li)):
	if li[i] != '':
		print(li[i], end=' ')


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())
P = 1000000007
s = input()
s1 = ''
i = 0
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i += 3
	else:
		x = s.find('WUB', i)
		if x != -1:
			s1 = s1 + s[i:x] + ' '
			i += x - i
		else:
			s1 = s1 + s[i:]
			i += len(s)
print(s1)


s = input()
n = len(s)
song = []
newword = ''
i = -1
while i < n - 1:
	i = i + 1
	if s[i] == 'W' and i + 2 < n:
		if s[i + 1] == 'U' and s[i + 2] == 'B':
			if newword != '':
				song.append(newword)
			newword = ''
			i = i + 2
		else:
			newword = newword + s[i]
	else:
		newword = newword + s[i]
		if i == n - 1:
			song.append(newword)
for i in range(len(song)):
	print(song[i], end=' ')


stringa = input()
snuova = ''
i = 0
while i < len(stringa):
	if stringa[i:i + 3] == 'WUB':
		i += 3
	else:
		snuova += stringa[i]
		if stringa[i + 1:i + 4] == 'WUB':
			snuova += ' '
		i += 1
l = list(snuova)
if l[len(l) - 1] == ' ':
	del l[len(l) - 1]
sdef = ''
for el in l:
	sdef += el
print(sdef)


x = input()
res = x.split('WUB')
for i in res:
	if i != '':
		print(i, end=' ')


song = str(input())
song = song.replace('WUB', ' ').strip()
for i in range(1000):
	song = song.replace('  ', ' ')
print(song)


s = input().split('WUB')
s = [k for k in s if k]
print(' '.join(s).strip())


(remix, slovo, piesen, index_w, wub) = (input(), '', [], 0, 'WUB')
for pismeno in remix:
	if pismeno == wub[index_w]:
		index_w += 1
		if index_w == 3:
			if len(piesen) > 0:
				if piesen[-1] != ' ':
					piesen.append(' ')
			index_w = 0
	else:
		piesen.append(wub[:index_w])
		index_w = 0
		if pismeno == 'W':
			index_w = 1
		else:
			piesen.append(pismeno)
piesen.append(wub[:index_w])
print(''.join(piesen))


x = input().split('WUB')
x = list(filter(lambda a: a != '', x))
print(' '.join(x))


s = str(input())
s = s.replace('WUB', ' ')
l = s.split(' ')
while l.count('') > 0:
	l.remove('')
print(' '.join(map(str, l)))


a = str(input())
b = 'WUB'
a = a.replace(b, ' ')
i = 0
while i < len(a):
	if a[i] != ' ':
		c = i
		break
	i += 1
j = i
k = ''
while j < len(a):
	k += a[j]
	j += 1
r = 0
v = '  '
t = ' '
while r < len(k):
	k = k.replace(v, t)
	r += 1
print(k)


string = input()
lista = string.split('WUB')
word = ''
for string in lista:
	if string:
		word += string + ' '
print(word)


masukan = input()
print(' '.join([item for item in masukan.split('WUB') if item != '']))


n = input().split('WUB')
y = n.count('')
for i in range(y):
	n.remove('')
n = list(map(str, n))
n = ' '.join(n)
print(n)


s = input()
g = ''
r = []
for i in range(len(s)):
	g += s[i]
	if g == 'WUB':
		g = ''
	elif g[-3:] == 'WUB':
		r += [g[:-3]]
		g = ''
r += [g]
print(*r)


import sys
inp = sys.stdin.readline
oup = sys.stdout.write
s = inp()
s = s.replace('WUB', ' ')
for _ in range(20):
	s = s.replace('  ', ' ')
oup(s.strip())


s = input()
e = ''
for i in s.split('WUB'):
	if i != '':
		e = e + i + ' '
print(e)


s = input()
res = ''
x = s.split('WUB')
for i in x:
	if i != '':
		res += ''.join(i)
		res += ' '
print(res.strip())


S = input()
k = 1
while k != 0:
	k = 0
	l = len(S)
	for i in range(l - 2):
		if S[i] == 'W' and S[i + 1] == 'U' and (S[i + 2] == 'B'):
			S = S[:i] + ' ' + S[i + 3:]
			k = 1
			break
l = len(S)
S1 = ''
if S[0] != ' ':
	S1 = S1 + S[0]
for i in range(1, l):
	if S[i] == ' ' and S[i - 1] != ' ':
		S1 = S1 + ' '
	if S[i] != ' ':
		S1 = S1 + S[i]
print(S1)


s = input()
li = s.split('WUB')
for x in li:
	if x != '':
		print(x, end=' ')


s = input()
s = s.replace('WUB', ' ')
a = s.split()
for i in range(len(a)):
	if i != len(a) - 1:
		print(a[i], end=' ')
	else:
		print(a[i])


import re
s = input().strip()
r = ' '.join([x for x in re.split('(WUB)+', s) if x != '' and x != 'WUB'])
print(r)


string = input()
index = 0
ans = []
i = 0
if string.find('WUB') == -1:
	print(string)
else:
	while string.find('WUB', i) != -1:
		index = string.find('WUB', i)
		srez = string[i:index]
		if srez != '':
			ans.append(string[i:index])
		i = index + 3
	index += 3
	ans.append(string[index:])
	print(*ans)


my_str = input()
temp = my_str
counter = 0
if my_str.find('WUB') == -1:
	print(my_str)
elif my_str[0:3] == 'WUB':
	lst = my_str.split('WUB')
	a = ' '.join((str(item) for item in lst))
	a = ' '.join(a.split())
	print(a)
else:
	lst = my_str.split('WUB')
	b = ' '.join((str(item) for item in lst))
	b = ' '.join(b.split())
	print(b)


s = input().strip()
s += '@@'
string = ' '
i = 0
while i < len(s) - 2:
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		if len(string) > 0 and string[-1].isalpha():
			string += ' '
		i += 3
	else:
		string += s[i]
		i += 1
print(string.strip())


import re
x = input()
x = x.replace('WUB', ' ').strip()
x = re.sub(' +', ' ', x)
print(x)


a = input()
while a.find('WUBWUB') != -1:
	a = a.replace('WUBWUB', 'WUB')
a = a.replace('WUB', ' ')
a = a.lstrip()
a = a.rstrip()
print(a)


inpt = input()
ans1 = list(inpt.replace('WUB', ' '))
if ans1[0] == ' ':
	i = 0
	while ans1[i] == ' ':
		del ans1[i]
if ans1[-1] == ' ':
	i = -1
	while ans1[i] == ' ':
		del ans1[i]
i = 0
while i < len(ans1) - 1:
	if ans1[i + 1] == ' ' and ans1[i] == ' ':
		del ans1[i]
	else:
		i += 1
final = ''
for c in ans1:
	final += c
print(final)


s = input().split('WUB')
result = ''
for i in s:
	if i != '':
		result = result + i + ' '
print(result.strip())


s = input().split('WUB')
arr = []
i = 0
for i in s:
	if i != '':
		print(i, end=' ')


s = input().split('WUB')
for ss in s:
	if not ss == '':
		print(ss, end=' ')


inp = input()
no = inp.count('WUB')
words = inp.split('WUB')
words = filter(None, words)
print(' '.join(words))


s = input()
p = s.split('WUB')
res = ''
for i in range(0, len(p)):
	if p[i] != '' and i != len(p) - 1:
		res = res + p[i] + ' '
	elif p[i] != '' and i == len(p) - 1:
		res = res + p[i]
print(res)


line = input().split('WUB')
line2 = [l for l in line if len(l) > 0]
print(' '.join(line2))


i = input()
l = i.split('WUB')
s = ''
for i in l:
	if i is not '':
		s = s + i + ' '
print(s.strip())


s = input()
while True:
	p = s.find('WUB')
	if p == -1:
		break
	s = s[:p] + ' ' + s[p + 3:]
l = s.split()
print(*l, sep=' ')


s = input().split('WUB')
s = filter(None, s)
sq = ' '
print(sq.join(s))


remix_song = input()
original_song = remix_song.split('WUB')
temp_list = []
for word in original_song:
	if word != '':
		temp_list.append(word)
output = ' '.join(temp_list)
print(output)


s = input()
licznik = 0
slowo = ''
for i in range(len(s)):
	if licznik > 0 and licznik < 3:
		licznik += 1
		continue
	else:
		licznik = 0
	if s[i:i + 3] == 'WUB':
		licznik += 1
		continue
	slowo += s[i]
	if s[i + 1:i + 4] == 'WUB':
		slowo += ' '
print(slowo)


word = str(input())
ans = ''
for i in word.split('WUB'):
	if i != '':
		ans += i + ' '
print(ans)


x = input()
x = x.split('WUB')
v = list(filter(''.__ne__, x))
v = ' '.join(v).strip()
print(v)


print(' '.join([_ for _ in input().replace('WUB', ' ').strip().split() if len(_)]))


from sys import stdin

def main():
	a = stdin.readline().strip().split('WUB')
	ans = ''
	for i in range(len(a)):
		if a[i] != '':
			ans = ans + a[i] + ' '
	print(ans)
main()


n = input()
ans = n.split('WUB')
res = ''
for i in ans:
	if i == '':
		continue
	else:
		res += i
		res += ' '
print(res.strip())


x = input()
t = x.replace('WUB', ' ')
y = t.split()
l = ''
for i in y:
	l += i + ' '
print(l)


x = input()
y = ['WUB']
for sub in y:
	x = x.replace(sub, ' ')
res = ' '.join(x.split())
print(res)


s = input().split('WUB')
l = []
c = 0
for i in s:
	if i != '':
		l.insert(c, i)
		c += 1
print(*l)


s = input()
s = s.replace('WUB', ' ').strip().split(' ')
for f in s:
	if f != '':
		print(f, end=' ')


s = input()
temp = ''
j = 0
s = 'WUB' + s + 'WUB'
while j < len(s) - 2:
	if s[j] == 'W' and s[j + 1] == 'U' and (s[j + 2] == 'B'):
		j += 3
		temp += ' '
	else:
		temp += s[j]
		j += 1
r = temp.split()
print(' '.join(r))


line = input()
line = line.split('WUB')
line = [i for i in line if i]
print(' '.join(line))


s = input().split('WUB')
k = ''
for i in s:
	if i != '':
		k = k + ' ' + i
print(k.strip(' '))


string = input()
temp = string.replace('WUB', ' ').strip()
arr = temp.split()
for i in arr:
	print(i, end=' ')


song = input()
i = 0
temp = ''
firstflag = False
secondflat = False
while i != len(song):
	if i >= len(song) - 2:
		if secondflat == True and firstflag == True:
			temp += ' ' + song[i]
			secondflat = False
		else:
			temp += song[i]
		i += 1
		continue
	if song[i] == 'W' and song[i + 1] == 'U' and (song[i + 2] == 'B'):
		i += 3
		if secondflat == True:
			firstflag = True
	else:
		secondflat = True
		if secondflat == True and firstflag == True:
			temp += ' ' + song[i]
			firstflag = False
		else:
			temp += song[i]
		i += 1
print(temp)


import math
import sys

def dict_sort(ans):
	ans = sorted(ans.items(), reverse=True, key=lambda kv: kv[1])

def is_prime(n):
	if n == 1:
		return 0
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			return False
	return True

def inp():
	ls = list(map(int, input().split()))
	return ls
gg = 'abcdefghijklmnopqrstuvwxyz'
alpl = list(gg)
alpu = list(gg.upper())
s = input()
ls = list(s.replace('WUB', ' ').split())
for i in ls:
	if i != ' ':
		print(i, end=' ')


string = input().replace('WUB', ' ').strip()
print(' '.join(string.split()))


x = input()
i = 0
s = ''
a = len(x)
if x[a - 1] != 'B' or x[a - 2] != 'U' or x[a - 3] != 'W':
	x = x + 'WUB'
while i < len(x) - 3:
	if x[i] == 'W' and x[i + 1] == 'U' and (x[i + 2] == 'B'):
		i += 3
	else:
		s += x[i]
		i += 1
		if x[i] == 'W' and x[i + 1] == 'U' and (x[i + 2] == 'B'):
			s = s + ' '
print(s)


txt = str(input()).split('WUB')
if txt.count('') > 0:
	txt.remove('')
res = ''
for i in txt:
	if i != '':
		res += i + ' '
print(res)


string = input()
string = string.split('WUB')
out = ''
for word in string:
	if word != '':
		out += '{} '.format(word)
print(out[:-1])


__author__ = 'Utena'
n = input()
n1 = ''
n = n.replace('WUB', ' ').strip(' ')
if len(n) > 1:
	for i in range(len(n) - 1):
		if n[i] == ' ' and n[i + 1] == ' ':
			continue
		else:
			n1 += n[i]
n1 += n[-1]
print(n1)


from re import sub
remix = input()
words = remix.split('WUB')
print(sub(' +', ' ', ' '.join(words)).strip())


s = str(input())
s = s.replace('WUB', ' ')
l = list(s)
i = 0
while i < len(l) - 1:
	if l[i] == l[i + 1] == ' ':
		del l[i]
	else:
		i += 1
if l[0] == ' ':
	del l[0]
s = str()
for i in range(len(l)):
	s += l[i]
print(s)


s = input()
l = s.split('WUB')
ans = ''
for e in l:
	if e != '':
		ans += e + ' '
print(ans[:-1])


L = input().split('WUB')
s = []
for char in L:
	if char != '':
		print(char, end=' ')


a = input()
a = a.replace('WUB', ' ')
a = a.split(' ')
s = ''
for i in a:
	if not i == '':
		s = s + ' ' + i
s = s.lstrip(' ')
s = s.lstrip(' ')
print(str(s))


w = input()
w = w.replace('WUB', ' ')
print(' '.join(w.split()))


ans = []
s = input()
i1 = i2 = 0
while s.find('WUB', i1, len(s)) != -1:
	i1 = s.index('WUB', i1, len(s))
	if i2 != i1:
		ans += [s[i2:i1]]
	i1 = i2 = i1 + 3
ans += [s[i2:]]
print(*ans)


import re
s = input()
pattern = '(WUB)+'
ans = re.sub(pattern, ' ', s).strip()
print(ans)


s = input()
lst = s.split('WUB')
words = []
for ch in lst:
	if ch != '':
		words.append(ch)
print(' '.join(words))


lyrics = input()
lyrics = lyrics.split('WUB')
while '' in lyrics:
	lyrics.remove('')
print(' '.join(lyrics))


s = input()
s = s.replace('WUB', ' ')
s = list(s.split(' '))
new = []
for i in range(len(s)):
	if len(s[i]) > 0:
		new.append(s[i].strip())
s = ' '
print(s.join(new))


string = input().split('WUB')
i = 0
check = False
while i < len(string):
	if string[i] != '':
		print(string[i], end=' ')
	i += 1


string = input()
song = string.split('WUB')
final = ''
for i in song:
	if len(i) == 0:
		pass
	else:
		final = final + i + ' '
print(final)


x = list(map(str, input().split('WUB')))
while True:
	if '' in x:
		x.remove('')
	else:
		break
print(' '.join(x))


s = input()
l = s.split('WUB')
a = ''
for w in l:
	a += w
	if not w == '':
		a += ' '
print(a)


song = input()
orig_lst = song.split('WUB')
orig_song = ''
for i in orig_lst:
	if i != '':
		orig_song += i + ' '
print(orig_song.rstrip())


dt = input().split('WUB')
dt = [i for i in dt if i]
print(' '.join(dt))


s = input().split('WUB')
ans = []
for i in s:
	if i != '':
		ans.append(i)
print(*ans)


s = input()
s1 = ''
list = s.split('WUB')
for i in range(len(list)):
	if list[i] == '':
		continue
	else:
		s1 = s1 + list[i] + ' '
print(s1)


s = input()
t = list(s.split('WUB'))
for i in t:
	if i != '':
		print(i, end=' ')


s = input()
a = 'WUB'
while len(s) > 0:
	if a in s:
		i = s.index(a)
	else:
		i = len(s)
	if i != 0:
		print(s[:i], end=' ')
	s = s[i + 3:]


import re
x = input('').upper()
string = re.sub('(WUB+?)\\1+|(WUB)', ' ', x).strip()
print(string)


inp = input()
while 'WUB' in inp:
	n = inp.find('WUB')
	inp = inp[0:n] + ' ' + inp[n + 3:]
print(' '.join(inp.split()))


s = input()
l = len(s)
risp = ''
while l != 0:
	if s[:3] != 'WUB':
		risp = risp + s[0]
		s = s[1:]
		l -= 1
		if s[:3] == 'WUB':
			risp += ' '
	else:
		s = s[3:]
		l -= 3
if risp[-1] == ' ':
	risp = risp[:-1]
print(risp)


n = input()
ans = ''
i = 0
x = 1
while i < len(n):
	if i == len(n) - 2:
		ans = ans + n[i] + n[i + 1]
		i = len(n)
	elif i == len(n) - 1:
		ans = ans + n[i]
		i = len(n)
	elif n[i:i + 3] == 'WUB':
		i = i + 3
		if x == 0 and i != len(n):
			ans = ans + ' '
		x = 1
	else:
		ans = ans + n[i]
		i = i + 1
		x = 0
print(ans)


print(*[s for s in input().replace('WUB', ' ').strip().split(' ') if s != ''])


ls = input().split('WUB')
for i in ls:
	if i != '':
		print(i, end=' ')


def solution():
	s = input()
	while True:
		if len(s) > 3 and s[0:3] == 'WUB':
			s = s[3:]
		else:
			break
	while True:
		if len(s) > 3 and s[-3:] == 'WUB':
			s = s[:-3]
		else:
			break
	lst = s.split('WUB')
	res = []
	for item in lst:
		if item != '':
			res.append(item)
			res.append(' ')
	print(''.join(res))
solution()


n = input()
n = n.split('WUB')
original_song = []
for i in n:
	if i != '':
		original_song += [i]
print(' '.join(original_song))


song = input()
song = song.replace('WUB', ' ')
song = song.strip()
words = [word.strip() for word in list(song.split())]
print(' '.join(words))


s = [x for x in input().split('WUB') if not x == '']
print(' '.join(s))


song = str(input())
a = song.replace('WUB', ' ')
b = a.strip()
orisong = ' '.join(b.split())
print(orisong)


print(' '.join(filter(lambda x: x is not '', input().split('WUB'))))


import re
st = input()
st = st.replace('WUB', ' ')
st = st.strip()
st = ' '.join(st.split())
print(st)


r = input()
r = r.replace('WUB', ' ')
r.strip()
print(' '.join(r.split()))


s = input().split('WUB')
for c in s:
	if c != '':
		print(c, end=' ')


string = input()
string1 = 'WUB'
a = string.replace('WUB', ' ')
b = a.strip()
c = b.split()
d = ' '.join(c)
print(d)


lyrics = [*input()]
wubbing = False
newstr = ''
letter = 0
if len(lyrics) >= 3:
	while letter < len(lyrics):
		if letter <= len(lyrics) - 3:
			if lyrics[letter] == 'W' and lyrics[letter + 1] == 'U' and (lyrics[letter + 2] == 'B'):
				wubbing = True
				letter += 2
			elif wubbing:
				wubbing = False
				newstr += ' ' + lyrics[letter]
			else:
				newstr += lyrics[letter]
			letter += 1
		else:
			if wubbing:
				wubbing = False
				newstr += ' ' + lyrics[letter]
			else:
				newstr += lyrics[letter]
			letter += 1
	print(newstr.strip())
else:
	for x in lyrics:
		print(x, end='')


def count(s):
	a = 0
	w = 1
	for i in range(0, len(s)):
		if s[i] == ' ':
			a += 1
	for i in range(0, len(s)):
		if s[i] == ' ' and s[i + 1] != ' ':
			w += 1
	return (a, w)
s = input()
x = ''
i = 0
try:
	while i != len(s):
		if s[i] == 'W':
			if s[i + 1] == 'U':
				if s[i + 2] == 'B':
					x = x + ' '
					i += 3
				else:
					x = x + s[i]
					i += 1
			else:
				x = x + s[i]
				i += 1
		else:
			x = x + s[i]
			i += 1
except IndexError:
	x = x + s[i]
	if i != len(s) - 1:
		x = x + s[i + 1]
x = x.lstrip()
x = x.rstrip()
(a, b) = count(x)
while b - a != 1:
	for i in range(0, len(x)):
		if x[i] == ' ' and x[i + 1] == ' ':
			x = x[0:i + 1] + x[i + 2:]
			break
	(a, b) = count(x)
print(x)


phrase = input()
phrase = phrase.replace('WUB', ' ')
phrase = ' '.join(phrase.split())
print(phrase)


s = 'WUB' + input() + 'WUB'
n = len(s)
i = 0
x = True
while i < n - 2:
	if s[i:i + 3] == 'WUB':
		i += 3
		print(['', ' '][x == False], end='')
		x = True
	else:
		print(s[i], end='')
		i += 1
		x = False


withFile = 0
if withFile == 1:
	fin = open('/mnt/Files/devel/tests/input.txt', 'r')
	fout = open('/mnt/Files/devel/tests/output.txt', 'w')

def getl():
	if withFile == 0:
		return input()
	else:
		return fin.readline()

def printl(s):
	if withFile == 0:
		print(s)
	else:
		fout.write(str(s))

def get_arr():
	x = getl().split(' ')
	if x[-1] == '':
		x = x[:-1]
	return list(map(int, x))
s = getl()
s = s.replace('WUB', ' ')
i = 0
a = ''
while i < len(s) and s[i] == ' ':
	i += 1
for j in range(i, len(s)):
	if j != 0 and s[j] == s[j - 1] and (s[j] == ' '):
		continue
	a += s[j]
printl(a)
if withFile == 1:
	fin.close()
	fout.close()


wat = input()
wat = wat.split('WUB')
wat = [x for x in wat if x != '']
print(' '.join(wat))


s = input()
s = s.replace('WUB', ' ')
s = s.split()
for substring in s:
	print(substring, end=' ')


x = input().split('WUB')
for i in x:
	if len(i) > 0:
		print(i, sep='', end=' ')


s = input().split('WUB')
for i in range(s.count('')):
	s.remove('')
print(*s)


inp = input().split('WUB')
i = 0
while inp[i] == '':
	inp.remove('')
ans = ''
for block in inp:
	if block != 'WUB' and block != '':
		ans = ans + block + ' '
print(ans[:-1])


song = [str(x) for x in input().split('WUB') if x != '']
if len(song) == 1:
	print(song[0])
else:
	print(' '.join(song))


k = input()
c = k.count('WUB')
for i in range(c):
	p = k.index('WUB')
	k = k[:p] + ' ' + k[p + 3:]
cc = k.split()
k2 = ''
for i in cc:
	k2 += i + ' '
k2 = k2[:-1]
print(k2)


n = list(input().split('WUB'))
ans = ''
for i in range(len(n)):
	if n[i] != '':
		ans += n[i] + ' '
print(ans)


print(' '.join([word for word in input().split('WUB') if len(word) > 0]))


str1 = input()
len1 = len(str1)
n = str1.count('WUB')
ini = -3
Wlist = []
for i in range(0, n):
	ini = str1.find('WUB', ini + 3)
	Wlist.extend([ini, ini + 1, ini + 2])
for k in range(0, len1):
	if (k in Wlist) == False:
		if (k + 1 in Wlist) == False:
			print(str1[k], end='')
		else:
			print(str1[k], end=' ')


str = input()
str = str.replace('WUB', ' ')
rez_str = ''
for i in range(len(str)):
	if str[i] != ' ':
		rez_str += str[i]
	elif str[i - 1] != ' ':
		rez_str += ' '
rez_str = rez_str.strip()
print(rez_str)


s = input()
s1 = ''
while len(s) != 0:
	k = s.find('WUB')
	if k != -1:
		if k == 0:
			s = s[k + 3:]
		else:
			s1 = s1 + s[:k] + ' '
			s = s[k:]
	else:
		s1 = s1 + s
		s = ''
print(s1)


dj = input()
rap = 'WUB'
dj = rap + dj + rap
song = []
while rap in dj:
	next = dj.find(rap, 1)
	n = len(dj)
	if next == 3:
		dj = dj[next:n]
	else:
		song.append(dj[3:next])
		dj = dj[next:n]
print(*song, sep=' ')


r = input()
r = r.split('WUB')
s = [i for i in r if i != '']
print(' '.join(s))


import re
s = input()
s = s.split('WUB')
s = filter(None, s)
print(' '.join(s))


song = input()
i = 0
sent = []
word = []
while i < len(song):
	if i + 2 < len(song):
		if song[i] == 'W' and song[i + 1] == 'U' and (song[i + 2] == 'B') and (i + 2 < len(song)):
			i += 3
			if word == []:
				continue
			else:
				word = ''.join(map(str, word))
				sent.append(word)
				word = []
		else:
			word.append(song[i])
			i += 1
	else:
		word.append(song[i])
		i += 1
if word != []:
	word = ''.join(map(str, word))
	sent.append(word)
	word = []
sent = ' '.join(sent)
print(sent)


def iswub(i, a):
	if a[i] == 'W' and a[i + 1] == 'U' and (a[i + 2] == 'B'):
		return True
	else:
		return False
S = input()
n = len(S)
a = []
for x in S:
	a.append(x)
for i in range(n - 2):
	if iswub(i, a):
		a[i] = 0
		a[i + 1] = 0
		a[i + 2] = 0
s = ''
for x in range(n):
	if a[x] == 0:
		if len(s) != 0:
			if s[len(s) - 1] != ' ':
				s += ' '
	else:
		s += a[x]
print(s)


from sys import stdin
variable = stdin.readline().upper().strip().split('WUB')
x = str(variable[0])
if len(variable) < 200:
	for x in variable:
		cadena = ' '.join(variable).replace(',', ' ')
	for x in cadena:
		cadena = cadena.replace('  ', ' ')
	print(cadena.replace('  ', ' ').strip() + ' ')


s = input()
flag = 0
k = s.replace('WUB', '1')
for i in k:
	if i != '1':
		print(i, end='')
		flag = 1
	elif flag == 1:
		print(' ', end='')
		flag = 0


a = input()
a = a.replace('WUB', ' ')
b = a.split()
for c in b:
	print(c, end=' ')


st = input()
c = 0
li = []
s1 = ''
flags = [1] * len(st)
for i in range(len(st) - 2):
	if st[i:i + 3] == 'WUB':
		flags[i:i + 3] = [0, 0, 0]
i = 0
sf = ''
while i < len(flags):
	if flags[i] == 1:
		while flags[i] == 1 and i < len(st) - 1:
			s1 += st[i]
			i += 1
		if i == len(st) - 1:
			s1 += st[i]
		sf += s1 + ' '
		s1 = ''
	i += 1
print(sf)


s = input()
pat = 'WUB'
l = s.split(pat)
ans = ''
for i in l:
	if i != '':
		ans += i + ' '
print(ans)


s = input()
s += '**'
a = ''
v = []
pt = 0
for i in range(0, len(s) - 2):
	if pt != 0:
		pt -= 1
		continue
	if s[i] + s[i + 1] + s[i + 2] == 'WUB':
		if len(a) != 0:
			v.append(a)
			a = ''
		pt = 2
	else:
		a += s[i]
v.append(a)
first = 0
for w in v:
	if len(w) != 0:
		if first == 1:
			print(' ', end='')
		print(w, end='')
		first = 1


str = input()
wubstreak = 0
resStr = ''
i = 0
while i < len(str):
	if str[i:i + 3] == 'WUB':
		wubstreak = 1
		i += 3
	else:
		if wubstreak == 1:
			wubstreak = 0
			resStr += ' '
		resStr += str[i]
		i += 1
print(resStr.lstrip())


str = input()
first = 0
while first < len(str):
	last = first
	while True:
		last = str.find('WUB', first, len(str))
		if last != first or last == -1:
			break
		first = last + 3
	if last != -1:
		print(str[first:last], end=' ')
		first = last + 3
	else:
		print(str[first:])
		break


s = str(input())
sent = s.split('WUB')
ans = ''
for word in sent:
	if word != '':
		ans += word + ' '
print(ans)


txt = str(input())
y = txt.replace('WUB', ' ')
x = ' '.join(y.strip().split())
print(x)


a = input()
wub = False
s = {'W', 'U', 'B'}
x = ''
ans = []
i = 0
while i < len(a):
	if a[i] == 'W' and i < len(a) - 1 and (a[i + 1] == 'U') and (i < len(a) - 2) and (a[i + 2] == 'B'):
		if x:
			ans.append(x)
			x = ''
		i += 3
	elif i > 0 and a[i - 1] == 'W' and (a[i] == 'U') and (i < len(a) - 1) and (a[i + 1] == 'B'):
		i += 2
	elif i > 1 and a[i - 2] == 'W' and (a[i - 1] == 'U') and (a[i] == 'B'):
		i += 1
	else:
		x += a[i]
		i += 1
if x:
	ans.append(x)
print(*ans)


line = input()
linelist = line.split('WUB')
linelist = [x for x in linelist if x != '']
line = ' '.join(linelist)
print(line.strip())


string = input()
nums = string.replace('WUB', ' ')
k = nums.strip()
l = k.replace(' ', '')
m = k.split()
print(' '.join(k.split()))


a = input().split('WUB')
for elem in a:
	if elem == '':
		continue
	print(elem, end=' ')


line = str(input())
words = [word for word in line.split('WUB') if word]
print(' '.join(words))


import sys

def checkIfWUB(string):
	return string == 'WUB' or string == 'UB'

def stripStartEnd(string):
	i = 0
	j = len(string) - 1
	while True:
		startChar = string[i]
		if startChar == 'W' and checkIfWUB(string[i:i + 3]):
			i += 3
			j -= 3
			string = string[i:]
			i = 0
		else:
			break
	while True:
		endChar = string[j]
		if endChar == 'B' and checkIfWUB(string[j - 2:j + 1]):
			j -= 2
			i += 3
			string = string[:j]
			j = len(string) - 1
		else:
			break
	return string
string = sys.stdin.readline().strip('\n')
string = stripStartEnd(string)
result = ''
wordOver = False
i = 0
while i != len(string):
	char = string[i]
	if char == 'W' and checkIfWUB(string[i:i + 3]):
		i += 3
		if not wordOver:
			result += ' '
		wordOver = True
	else:
		wordOver = False
		result += char
		i += 1
print(result)


s = input()
s = s.split('WUB')
l = [x for x in s if x != '']
for i in l:
	print(i, end=' ')


import math
import time
import random
the_song = input()
result = ''
space = False
TheFirstLetter = False
TheLastWubHere = False
if the_song[-3:] == 'WUB':
	TheLastWubHere = True
while the_song != '':
	if the_song[0:3] == 'WUB':
		the_song = the_song[3:]
		if TheFirstLetter and space:
			result += ' '
			space = False
	else:
		if not TheFirstLetter:
			TheFirstLetter = True
		result += the_song[0]
		the_song = the_song[1:]
		space = True
if TheLastWubHere:
	print(result[:-1])
else:
	print(result)


from collections import deque, Counter, OrderedDict
from heapq import nsmallest, nlargest
from math import ceil, floor, log, log2, sqrt

def binNumber(n, size=1):
	return bin(n)[2:].zfill(size)

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def iar():
	return list(map(int, input().split()))

def ini():
	return int(input())

def isp():
	return map(int, input().split())

def sti():
	return str(input())
s = sti()
p = s.split('WUB')
p1 = []
for i in p:
	if i != '':
		p1.append(i)
s = ' '.join(p1)
print(s)


import sys
import math
from os import path
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def get_key(val):
	for (key, value) in d.items():
		if val == value:
			return key
s = input()
ans = []
l = s.split('WUB')
for i in l:
	if i == '':
		continue
	ans.append(i)
print(' '.join(ans))


x = input('')
x = x.split('WUB')
for char in x:
	if char != '':
		print(char, end=' ')


x = input().split('WUB')
ans = list(filter(lambda a: a != '', x))
print(' '.join((str(b) for b in ans)))


string = input()
string = string.replace('WUB', ' ')
f = 0
i = 0
while i < len(string):
	if f == 0 and string[i] == ' ':
		k = 1
		i = i + 1
	else:
		break
string = string[i:len(string)]
i = len(string) - 1
while i > 0:
	if string[i] == ' ':
		i = i - 1
	else:
		break
string = string[0:i + 1]
abc = ''
i = 0
f = 0
while i < len(string):
	j = i
	while string[j] == ' ':
		f = 1
		j = j + 1
	if f == 0:
		abc = abc + string[i]
		i = i + 1
	if f == 1:
		abc = abc + ' '
		i = j
		f = 0
print(abc)


S = input()
while S.find('WUB') > -1:
	k = S.find('WUB')
	S = S[:k] + ' ' + S[k + 3:]
l = S.split()
print(*l)


import sys
input = sys.stdin.readline

def solve():
	s = input().strip()
	s = [x for x in s.replace('WUB', '*').split('*') if x != '']
	print(' '.join(s))
	return 0

def main():
	t = 1
	while t > 0:
		solve()
		t -= 1
	return 0
main()


s = str(input())
l = list(s.split('WUB'))
while '' in l:
	l.remove('')
print(*l)


s = input()
n = len(s)
i = 0
words = []
x = ''
while i < n:
	if s[i] == 'W' and i + 1 < n and (s[i + 1] == 'U') and (i + 2 < n) and (s[i + 2] == 'B'):
		i += 3
		if x != '':
			words.append(x)
			x = ''
	else:
		x += s[i]
		i += 1
words.append(x)
for x in words:
	print(x.strip(), end=' ')


x = list(input().split('WUB'))
for i in x:
	if i != '':
		print(i, end=' ')


import sys
import re
song = sys.stdin.readline().strip()
sys.stdout.write(re.sub('(WUB)+', ' ', song).strip())


ans = input().split('WUB')
for i in range(len(ans) - 1, -1, -1):
	if ans[i] == '':
		ans.pop(i)
print(' '.join(ans))


n = input()
l = list(n.split('WUB'))
for i in l:
	if len(i) > 0:
		print(i, end=' ')


string = input()
string = string.replace('WUB', ' ')
while string[0] == ' ':
	string = string.replace(' ', '', 1)
while string.find('  ') != -1:
	string = string.replace('  ', ' ')
print(string)


word = input().split('WUB')
list2 = [x for x in word if x]
print(*list2)


lst = [str(x) for x in input().split('WUB')]
while '' in lst:
	lst.remove('')
print(' '.join((x for x in lst)))


dub = input().strip()
dub = dub.split('WUB')
dub = [d for d in dub if len(d) > 0]
print(' '.join(dub))


from sys import stdin
read = stdin.readline

def solves(s):
	aco = ''
	u = ''
	band = True
	for c in s:
		aco += c
		if c == 'W':
			u = 'W'
		elif u == 'W' and c == 'U':
			u = 'U'
		elif u == 'U' and c == 'B':
			if len(aco) > 3:
				if band:
					print(aco[:-3], end='')
					band = False
				else:
					print(' ', end='')
					print(aco[:-3], end='')
			aco = ''
			u = ''
		else:
			u = ''
	if len(aco) > 0:
		if band:
			print(aco, end='')
			band = False
		else:
			print(' ', end='')
			print(aco, end='')

def main():
	inp = read().strip()
	solves(inp)
main()


n = input()
n = n.split('WUB')
for each in n:
	if each:
		print(each, end=' ')


x = input().split('WUB')
y = ''
for i in x:
	if i != '':
		y = y + i + ' '
print(y[:-1])


a = input().split('WUB')
while '' in a:
	if '' in a:
		a.remove('')
print(*a, sep=' ')


s = str(input())
a = s.strip().split('WUB')
for i in a:
	if i != '':
		print(i, end=' ')


s = input()
b = s.count('WUB')
c = ''
x = 0
for i in range(b):
	y = s.find('WUB', x)
	if y != x:
		c = c + s[x:y] + ' '
	x = y + 3
c = c + s[x:]
print(c)


string = input()
string = string.replace('WUB', ' ')
string.strip()
a = string.split()
for i in a:
	print(i, end=' ')


data = input().split('WUB')
data = [x for x in data if x != '']
print(' '.join(data))


s = str(input())
a = s.split('WUB')
while a.count(''):
	a.remove('')
print(' '.join(a))


s = input()
j = 0
b = 3
datau = []
data = ''
s = 'WUB' + s + 'WUB'
while j < len(s) - 2:
	x = s[j] + s[j + 1] + s[j + 2]
	if x == 'WUB':
		j += 3
		datau += [data]
		data = ''
	else:
		data += s[j]
		j += 1
for i in datau:
	if i != '':
		print(i, end=' ')


a = input()
a = a.split('WUB')
answ = ''
for i in range(len(a)):
	if a[i] != '':
		answ = answ + str(a[i]) + ' '
print(answ)


s_in = input()
s_out = ' '.join(s_in.replace('WUB', ' ').split())
print(s_out)


a = input()
a = a.split('WUB')
b = []
for k in range(len(a)):
	if a[k] != '':
		b.append(a[k])
b = ' '.join(b)
print(b)


import re
song = input()
song = re.sub('^(WUB)+', '', song)
print(re.sub('(WUB)+', ' ', song))


s = input()
l = s.split('WUB')
s1 = ''
l1 = []
for i in l:
	if i != '':
		l1.append(i)
for i in l1:
	s1 += i + ' '
print(s1)


a = input()
a = list(a.split('WUB'))
while a.count('') != 0:
	a.remove('')
for i in a:
	print(i, end=' ')


s = input()
s = s.replace('WUB', ' ')
while s[0] == ' ':
	s = s[1:]
while s[-1] == ' ':
	s = s[:-1]
ans = ''
ans = ans + s[0]
for i in s[1:]:
	if i != ' ' or i != ans[-1]:
		ans = ans + i
print(ans)


s = list(map(str, input().split('WUB')))
for el in s:
	if len(el) > 0:
		print(el, end=' ')


song = str(input())

def wards_of_song(song):
	song = song.split('WUB')
	list_of_song = []
	for i in song:
		if i != '':
			list_of_song += [i]
	return ' '.join(list_of_song)
print(wards_of_song(song))


a = input()
lis = a.split('WUB')
s = ''
for i in lis:
	if i == '':
		continue
	s += i + ' '
print(s)


s = input()
print(' '.join(list(filter(lambda a: a != '', s.split('WUB')))))


song = input().split('WUB')
realSong = []
for i in song:
	if i != '':
		realSong.append(i)
print(' '.join(realSong))


s = input()
s_len = len(s)
substring = 'WUB'
start = 0
subs_ind = []
while start < s_len:
	index = s.find(substring, start)
	if index != -1:
		subs_ind.append(index)
		start = index + 3
	else:
		break
if len(subs_ind) == 0:
	print(s)
else:
	song = []
	if subs_ind[0] > 0:
		for i in range(subs_ind[0]):
			song.append(s[i])
		song.append(' ')
	for i in range(len(subs_ind) - 1):
		dif = subs_ind[i + 1] - subs_ind[i]
		if dif > 3:
			for j in range(subs_ind[i] + 3, subs_ind[i + 1]):
				song.append(s[j])
			song.append(' ')
	if subs_ind[-1] < s_len - 3:
		for i in range(subs_ind[-1] + 3, s_len):
			song.append(s[i])
	song = ''.join(song)
	print(song)


s = input()
s = s.replace('WUB', ' ')
s = s.split()
ns = ''
for a in s:
	ns += a + ' '
ns.rstrip()
print(ns)


l = [str(i) for i in input().split(sep='WUB') if i != '']
print(*l, sep=' ', end='')


import math
import random
mod = 1000000007
r1 = lambda : int(input())
rm = lambda : map(int, input().split())
rls = lambda : list(rm())
s1 = input().split('WUB')
ans = ''
for i in s1:
	if i != '':
		ans += i + ' '
print(ans[:-1])


s = input()
l = s.split('WUB')
temp = ''
for i in l:
	temp += i
	if i != '':
		temp += ' '
print(temp)


m = list(map(str, input().split('WUB')))
for i in range(len(m)):
	if m[i] != '':
		print(m[i], end=' ')


texto = input('').split('WUB')
texto = [x for x in texto if x != '']
print(' '.join(texto))


inp = list(input())
lst = []
i = 0
s = ''
if len(inp) >= 3:
	while i + 2 <= len(inp) - 1 and (inp[i] == 'W' and inp[i + 1] == 'U' and (inp[i + 2] == 'B')):
		i = i + 3
	while i < len(inp):
		s = s + inp[i]
		if i + 2 <= len(inp) - 1:
			if inp[i] == 'W' and inp[i + 1] == 'U' and (inp[i + 2] == 'B'):
				i = i + 2
				lst.append(s[:-1])
				lst.append('101')
				s = ''
		i = i + 1
	lst.append(s)
	if lst[-1] == '' or lst[-1] == '101':
		lst = lst[:-1]
	if lst[-1] == '' or lst[-1] == '101':
		lst = lst[:-1]
	j = 0
	for i in lst:
		if j == len(lst) - 1:
			if i != '101' and i != '':
				print(i)
				break
		if i != '101' and i != '':
			print(i, end=' ')
		j = j + 1
else:
	for i in inp:
		s = s + i
	print(s)


import sys
import math
sys.setrecursionlimit(100000)
str = input()
i = 0
res = ''
while i < len(str):
	if i <= len(str) - 3 and str[i] == 'W' and (str[i + 1] == 'U') and (str[i + 2] == 'B'):
		if not res.endswith(' '):
			res += ' '
		i += 3
	else:
		res += str[i]
		i += 1
print(res)


s = input('')
while s.find('WUB') == 0 and len(s) >= 3:
	s = s[3:]
while s.rfind('WUB') == len(s) - 3 and len(s) >= 3:
	s = s[:-3]
s = s.replace('WUB', ' ').split(' ')
s = [x for x in s if x != '']
print(' '.join(s))


song = input().split('WUB')
ori = []
for lyric in song:
	if lyric != '':
		ori.append(lyric)
for ele in ori:
	print(ele, end=' ')


inp = input()
for i in inp.split('WUB'):
	if i != '':
		print(i, end=' ')


words = input()
x = words.split('WUB')
string = ''
for i in x:
	if i != '':
		string = string + i + ' '
print(string)


s = input()
t = ''
while s != '':
	if s[:3] == 'WUB':
		s = s[3:]
		t += ' '
	else:
		t += s[0]
		s = s[1:]
print(' '.join(t.split()))


for i in filter(lambda x: x != '', input().split('WUB')):
	print(i, end=' ')


line1 = input().split(sep='WUB')
length = len(line1)
line2 = []
for i in range(length):
	if line1[i] != '':
		line2.append(line1[i])
print(' '.join(line2))


remix = input().split('WUB')
ans = ''
for i in remix:
	if i != '':
		ans += i
		ans += ' '
print(ans)


L = input('').split('WUB')
M = [i for i in L if i != '']
print(' '.join(M))


n = input()
i = 0
ar = []
a = 0
while i < len(n):
	if n[i:i + 3] == 'WUB':
		if n[a:i] == '':
			a = i + 3
			i = i + 3
		else:
			ar.append(n[a:i])
			a = i + 3
			i = i + 3
	else:
		i = i + 1
		continue
if n[a:i] != '':
	ar.append(n[a:i])
for i in range(0, len(ar)):
	print(ar[i], end=' ')


s = input()
words = s.split('WUB')
s = ''
for i in words:
	if i != '':
		s += i + ' '
print(s.strip())


st = input()
st = st.replace('WUB', ' ')
st = st.split()
for i in st:
	print(i, end=' ')


import sys

def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep=' ', end='\n'):
	print(*var, file=sys.stderr, end=end, sep=sep)
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

def convert_check(num, base):
	base_rev = ''
	if num == 0:
		base_rev = '0'
	while num > 0:
		r = num % base
		if r > 1:
			return 'NO'
		num = num // base
		base_rev += str(r)
	return base_rev[::-1]
s = input()
tokens = s.split('WUB')
tokens = [token for token in tokens if token != '']
print(' '.join(tokens))


def check(s, i):
	s1 = 'WUB'
	j = 0
	while j < 3:
		if s[i] != s1[j]:
			return False
		j += 1
		i += 1
	return True
s = input()
i = 0
res = 0
while i < len(s):
	if i <= len(s) - 3 and check(s, i):
		i += 2
		if res == 1:
			print(end=' ')
			res = 0
	else:
		print(s[i], end='')
		res = 1
	i += 1


word = input().split('WUB')
res = ''
for e in word:
	if e != '':
		res += e + ' '
print(res)


import sys
if False:
	input = open('dubstep.txt', 'r')
else:
	input = sys.stdin
remix = input.readline()
new = remix.replace('WUB', ' ')
list = new.split()
print(' '.join(list))


s = input()
ss = ''
for i in s.split('WUB'):
	if i != '':
		ss += i + ' '
print(ss.strip())


music = input()
words = music.split('WUB')
string = ''
for x in words:
	if x != '':
		string += x + ' '
print(string)


a = input()
b = list(a.split('WUB'))
for i in b:
	if i == '':
		pass
	else:
		print(i, end=' ')


from string import *
print(*' '.join(input().split('WUB')).lstrip().replace('\\s+', '').split())


str = input()
str = str.split('WUB')
ans = []
for s in str:
	if s == '':
		continue
	ans.append(s)
str = ' '.join(ans)
print(str)


n = input()
t5 = n.replace('WUBWUBWUBWUBWUB', ' ')
t4 = t5.replace('WUBWUBWUBWUB', ' ')
t3 = t4.replace('WUBWUBWUB', ' ')
t2 = t3.replace('WUBWUB', ' ')
t = t2.replace('WUB', ' ')
c5 = t.replace('     ', ' ')
c4 = c5.replace('    ', ' ')
c3 = c4.replace('   ', ' ')
c2 = c3.replace('  ', ' ')
b = c2.find(' ')
if b == 0:
	print(c2[1:])
else:
	print(c2)


s = input()
l = list(s)
c = 0
while c <= len(s) - 3:
	if l[c:c + 3] == ['W', 'U', 'B']:
		l[c:c + 3] = [' ', ' ', ' ']
		c += 3
	else:
		c += 1
l = ' '.join(l)
l = l.split(sep='   ')
for i in range(len(l)):
	l[i] = l[i].split()
	l[i] = ''.join(l[i])
l = ' '.join(l)
l = l.split()
l = ' '.join(l)
print(l)


s = input()
ss = s.split('WUB')
sss = [x for x in ss if x]
print(' '.join(sss))


A = input()
A = A.replace('WUB', ' ')
A = A.split()
a = ''
for i in A:
	a = a + i + ' '
print(a)


s = input()
t = 'WUB'
i = 0
while i < len(s):
	if s[i:i + 3] == t:
		if i == 0:
			s = s[i + 3:]
		elif i == len(s) - 3:
			s = s[:i]
		else:
			s = s[:i] + ' ' + s[i + 3:]
			i += 1
	else:
		i += 1
i = 0
while i < len(s):
	if s[i] != ' ':
		j = i
		out = ''
		while j < len(s) and s[j] != ' ':
			out += s[j]
			j += 1
		print(out, end=' ')
		i = j
	else:
		i += 1


s = input()
ans = []
i = 0
word = ''
while i < len(s):
	if s[i:i + 3] == 'WUB':
		if word:
			ans.append(word)
		word = ''
		i += 3
	else:
		word += s[i]
		i += 1
if word:
	ans.append(word)
print(' '.join(ans))


s = input()
A = s.split('WUB')
for i in A:
	if i == '':
		pass
	else:
		print(i, end=' ')


n = input()
a = list(n.split('WUB'))
print(' '.join((i for i in a if i != '')))


word = input()
a = word.replace('WUB', ' ')
l = a.split()
print(' '.join(l))


s = input().split('WUB')
r = list()
for i in s:
	if i != '':
		r.append(i)
print(' '.join(r))


p = input()
res = p.split('WUB')
res_str = ' '.join([r for r in res if r != ''])
print(res_str)


s = input().replace('WUB', ' ')
while '  ' in s:
	s = s.replace('  ', ' ')
s = s.lstrip()
s = s.rstrip()
print(s)


s = input()
s = list(s)
z = 'WUB'
i = 0
k = 1
l_pos = 0
while i < len(s) - 2:
	if s[i] + s[i + 1] + s[i + 2] == z:
		if k == 0:
			print(' ', end='')
		k = 1
		i += 3
		l_pos += 3
	else:
		k = 0
		print(s[i], end='')
		i += 1
		l_pos += 1
for i in range(l_pos, len(s)):
	print(s[i], end='')


t1 = input()
l = list(t1.split('WUB'))
for i in range(len(l)):
	if l[i] == '':
		pass
	else:
		print(l[i], end=' ')


list = input().split('WUB')
import copy
l1 = copy.deepcopy(list)
count = 0
for i in range(len(list)):
	if len(list[i]) == 0:
		count += 1
		del l1[i - count + 1]
a = ''
for i in range(len(l1) - 1):
	a += l1[i] + ' '
a += l1[len(l1) - 1]
print(a)


s = input()
n = len(s)
i = 0
k = ''
j = 0
while i < n:
	if s[i:i + 3] == 'WUB':
		if j == 0:
			k = k + ' '
			j = 1
			i += 3
		else:
			i += 3
	else:
		k = k + s[i]
		i = i + 1
		j = 0
k = k.strip()
print(k.strip())


a = input()
a = a.replace('WUB', ' ')
b = ''
for i in range(len(a)):
	if i == 0:
		b += a[i]
	elif a[i - 1] == ' ' and a[i] == ' ':
		continue
	else:
		b += a[i]
print(b)


print(' '.join(' '.join([str(elem) for elem in input().split('WUB')]).split()))


s = input()
s = s.split('WUB')
for i in range(len(s)):
	if '' in s:
		s.remove('')
	else:
		break
print(' '.join(s))


def main():
	inp = input().split('WUB')
	print(' '.join(' '.join(inp).split()))
main()


words = str(input().strip())
while True:
	if 'WUB' not in words:
		break
	else:
		location = words.find('WUB')
		words = words[:location] + ' ' + words[location + 3:]
print(' '.join(words.split()))


a = input().split('WUB')
result = []
for i in a:
	if i != '':
		result.append(i)
print(' '.join(result))


s = input()
word = ''
for i in s.split('WUB'):
	if i:
		word = word + ' ' + i
print(word.strip())


n = input()
p = n.split('WUB')
l = []
for i in p:
	if i != '':
		l.append(i)
s = ' '.join(l)
print(s)


l = list(map(str, input().split('WUB')))
ans = ''
for i in range(len(l)):
	if l[i] != '':
		ans += l[i] + ' '
print(ans)


petystr = input()
newstr = petystr.replace('WUB', ' ').split(' ')
oStr = [i for i in newstr if i != '']
n = len(oStr)
i = 0
while i < n:
	if i < n - 1:
		print(oStr[i], end=' ')
	else:
		print(oStr[i], end='')
	i += 1


text = input()
new_text = text.replace('WUB', ' ')
new_text = new_text.strip()
data = new_text.split(' ')
for i in range(0, len(data)):
	if data[i] != '':
		print(data[i], end=' ')


s = input()
s = s.replace('WUB', ' ')
ans = ''
for i in range(len(s) - 1):
	if s[i] != ' ':
		if s[i + 1] == ' ':
			ans += s[i]
			ans += ' '
		else:
			ans += s[i]
if s[len(s) - 1] != ' ':
	ans += s[len(s) - 1]
print(ans)


s = input()
ans = s.split('WUB')
for i in ans:
	if i != '':
		print(i, end=' ')
print()


a = input()
b = ''
c = []
d = ''
x = 0
y = 0
while len(a) <= 200 and x < len(a) and (x < len(a) - 2):
	if a[x] == 'W' and a[x + 1] == 'U' and (a[x + 2] == 'B'):
		x = x + 3
		c.append(b)
		b = ''
	elif a[x] != 'W' or a[x + 1] != 'U' or a[x + 2] != 'B':
		b = b + a[x]
		x = x + 1
		if x == len(a):
			c.append(b)
while len(a) - 2 <= x <= len(a) - 1:
	b = b + a[x]
	x = x + 1
	if x == len(a):
		c.append(b)
while y < len(c):
	d = d + c[y]
	if c[y] != '':
		d = d + ' '
	y = y + 1
print(d)


s1 = str(input())
k = s1.split('WUB')
for t in k:
	if t != '':
		print(t + ' ', end='')


a = input()
if 'WUB' in a:
	a = a.replace('WUB', ' ')
a = a.split()
print(' '.join(a))


k = input()
k = k.split('WUB')
for i in k:
	if i == '':
		continue
	else:
		i += ' '
		print(i, end='')


line = str(input())
line = line.replace('WUB', ' ')
print(' '.join(line.split()))


s = input()
indexes = [i for i in range(len(s)) if s[i:i + 3] == 'WUB']
words = []
j = 0
for idx in indexes:
	if j < idx:
		words.append(s[j:idx])
	j = idx + 3
if j < len(s):
	words.append(s[j:])
print(' '.join(words))


s = input()
s = s.replace('WUB', ' ')
s = s.split(' ')
while '' in s:
	s.remove('')
for i in range(len(s) - 1):
	print(s[i], end=' ')
print(s[-1])


s = input()
s = s.replace('WUB', ' ')
s = s.strip()
i = 0
while i < len(s) - 1:
	if s[i] == ' ' and s[i + 1] == ' ':
		s = s[:i] + s[i + 1:]
	else:
		i = i + 1
print(s)


print(' '.join([s for s in input().split('WUB') if len(s) > 0]))


s = input()
while s.find('WUB') == 0:
	s = s[3:]
while s.rfind('WUB') == len(s) - 3 and s.rfind('WUB') != -1:
	s = s[0:s.rfind('WUB')]
while s.find('WUBWUB') != -1:
	s = s[0:s.find('WUBWUB')] + s[s.find('WUBWUB') + 3:]
while s.find('WUB') != -1:
	s = s[0:s.find('WUB')] + ' ' + s[s.find('WUB') + 3:]
print(s)


a = input('')
l = a.split('WUB')
li = []
su = 0
for val in l:
	if val != '':
		su = su + 1
		if su == 1:
			li.append(val)
		else:
			li.append(' ' + val)
s = ''
for val in li:
	s = s + val
print(s)


import re
inp = re.sub(' +', ' ', input('').replace('WUB', ' ').strip())
print(inp)


s = input()
res = ''
c = 0
i = 0
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i = i + 3
		if c == 1:
			res = res + ' '
			c = 0
	else:
		res += s[i]
		i += 1
		c = 1
print(res)


text = input()
ans = ' '.join(text.replace('WUB', ' ').split())
print(ans)


a = input()
b = a.split('WUB')
for i in range(b.count('')):
	b.remove('')
ans = ''
for j in b:
	ans += j + ' '
print(ans[:-1])


a = input().split('WUB')
x = ''
for s in a:
	if len(s) != 0:
		x += ' ' + s
print(x[1:])


string = input()
sol = ''
i = 0
while i < len(string):
	if string[i:i + 3] == 'WUB':
		i += 3
	else:
		while i < len(string):
			sol = sol + string[i]
			i += 1
			if i + 3 > len(string):
				break
			if string[i:i + 3] == 'WUB':
				sol = sol + ' '
				break
print(sol)


z = input()
s = ''
d = ''
for i in range(len(z)):
	if i == len(z) - 2:
		if z[i] == 'U' and z[i + 1] == 'B' and (z[i - 1] == 'W'):
			continue
		elif z[i] == 'B' and z[i - 1] == 'U' and (z[i - 2] == 'W'):
			s += ' '
		else:
			s += z[i]
	elif i == len(z) - 1:
		if z[i] == 'B' and z[i - 1] == 'U' and (z[i - 2] == 'W'):
			continue
		else:
			s += z[i]
	elif z[i] == 'W' and z[i + 1] == 'U' and (z[i + 2] == 'B') or (z[i] == 'U' and z[i + 1] == 'B' and (z[i - 1] == 'W')) or (z[i] == 'B' and z[i - 1] == 'U' and (z[i - 2] == 'W')):
		d += z[i]
		if d == 'WUB':
			if i == len(z) - 3:
				d = ''
				s += ' '
			elif z[i + 1] == 'W' and z[i + 2] == 'U' and (z[i + 3] == 'B') or s == '':
				d = ''
			else:
				s += ' '
				d = ''
	else:
		s += z[i]
print(s)


a = input().strip().split('WUB')
x = ''
for i in a:
	if i != '':
		x = x + ' ' + i
print(x[1:])


s = input()
y = s.split('WUB')
x = []
for i in y:
	if i != '':
		x.append(i)
l = len(x)
for i in range(l):
	if i != l - 1:
		print(x[i], end=' ')
	else:
		print(x[i])


n = input()
m = int(len(n))
s = str()
while m != 0:
	if m >= 3 and n[0] == 'W' and (n[1] == 'U') and (n[2] == 'B'):
		n = n[3:]
		m = int(len(n))
	elif 'WUB' not in n:
		s = s + n + ' '
		break
	else:
		for i in range(m):
			if n[i] == 'W' and n[i + 1] == 'U' and (n[i + 2] == 'B'):
				s = s + n[0:i] + ' '
				n = n[i:]
				break
print(s.rstrip())


word = input()
x = word.replace('WUB', ' ')
n = x.split()
t = ' '.join(n)
print(t)


import sys
dubstep = input()
dubstep = dubstep.split('WUB')
output = ''
for i in dubstep:
	if len(i) >= 1:
		output += i
		output += ' '
print(output)


msg = input().split('WUB')
res = []
for x in msg:
	if not x.isspace() and (not x == ''):
		res.append(x)
print(' '.join(res).strip())


s = input()
g = s.replace('WUB', ' ')
s = ''
mylist = g.split()
for words in mylist:
	s = s + words + ' '
print(s)


zdanie = input()
tab = list(zdanie)
for i in range(len(tab) - 2):
	if tab[i] == 'W' and tab[i + 1] == 'U' and (tab[i + 2] == 'B'):
		(tab[i], tab[i + 1], tab[i + 2]) = (' ', ' ', ' ')
for i in range(len(tab) - 1):
	if tab[i] == ' ' and tab[i + 1] == ' ':
		tab[i] = ''
print(''.join(tab))


word = str(input())
s = ''
i = 0
flag = 1
while i < len(word):
	if word[i:i + 3] == 'WUB':
		i += 3
		flag = 0
	else:
		if flag == 0 and len(s) > 0:
			s = s + ' '
		s = s + word[i]
		flag = 1
		i += 1
print(s)


word = input()
L = word.split('WUB')
s = []
for i in range(len(L)):
	if L[i] != '':
		s.append(L[i] + ' ')
print(''.join(s))


strig = input()
strig = strig.replace('WUB', ' ')
while '  ' in strig:
	strig = strig.replace('  ', ' ')
if strig[0] == ' ':
	dummy = strig[1:]
	print(dummy)
else:
	print(strig)


a = input()
final = ''
while a[:3] == 'WUB':
	a = a[3:]
while a[-3:] == 'WUB':
	a = a[:-3]
while 'WUB' in a:
	x = a.index('WUB')
	final += a[:x]
	a = a[x + 3:]
	final += ' '
final += a
sa = final.split(' ')
while '' in sa:
	sa.remove('')
ff = ''
for element in sa:
	ff += element
	ff += ' '
print(ff[:-1])


s = input()
while s.find('WUB') != -1:
	s = s.replace('WUB', ' ')
while s.startswith(' '):
	s = s[1:]
while s.endswith(' '):
	s = s[:-1]
while s.find('  ') != -1:
	s = s.replace('  ', ' ')
print(s)


def _208A(sentence):
	words = sentence.split('WUB')
	return ' '.join(list(filter(lambda x: x != '', words)))
print(_208A(input()))


a = str(input())
b = ''
for i in range(0, len(a)):
	uvjet = 1
	if i + 2 < len(a) and a[i] == 'W' and (a[i + 1] == 'U') and (a[i + 2] == 'B'):
		uvjet = 0
	if i + 1 < len(a) and a[i] == 'U' and (a[i - 1] == 'W') and (a[i + 1] == 'B'):
		uvjet = 0
	if i - 2 >= 0 and a[i - 2] == 'W' and (a[i - 1] == 'U') and (a[i] == 'B'):
		uvjet = 0
	if uvjet:
		b += a[i]
		if i + 3 < len(a) and a[i + 1] == 'W' and (a[i + 2] == 'U') and (a[i + 3] == 'B'):
			b += ' '
print(b)


__author__ = 'shunakthakar'
s = str(input())
pq = s.replace('WUB', ' ')
k = ' '.join(pq.split())
print(k)


str = input().split('WUB')
out = ''
for x in str:
	if x != '':
		da = x + ' '
		out += da
print(out)


y1 = input('')
y = y1.split('WUB')
for i in range(0, len(y)):
	if y[i] != '':
		print(y[i], end=' ')


t = 1
for _ in range(t):
	x = input().split('WUB')
	s = ''
	for i in x:
		s += i + ' '
	m = s.split()
	o = ''
	for i in m:
		print(i, end=' ')


s = input()
s = s.replace('WUB', '.')
l = s.split('.')
k = []
for i in l:
	if i != '':
		k.append(i)
print(*k)


l = list(map(str, input().replace('WUB', ' ').split(' ')))
for i in l:
	print(i, end='')
	if len(i) > 0:
		print(' ', end='')


s = input()
ret = ''
i = 0
while i < len(s) - 3:
	if s[i:i + 3] == 'WUB':
		if ret != '' and ret[-1] != ' ':
			ret += ' '
		i = i + 2
	else:
		ret += s[i]
	i += 1
if s[i:len(s)] != 'WUB':
	ret += s[i:len(s)]
if ret[-1] == ' ':
	print(ret[:-1])
else:
	print(ret)


mystr = input()
mylist = []
mylist = mystr.split('WUB')
for i in mylist:
	if i != '':
		print(i, end=' ')


s = input()
t = s.replace('WUB', ' ')
p = t.strip().split()
print(' '.join(p))


s = input()
t = ''
n = s.split('WUB')
for i in n:
	if i != '':
		t = t + i + ' '
t = t[:-1]
print(t)


rmix = input().strip()
org = ''
i = 0
j = 0
n = len(rmix)
while i < n:
	if rmix[i:i + 3] == 'WUB':
		if i != j:
			org += rmix[j:i] + ' '
		j = i + 3
		i = i + 3
	else:
		i += 1
if i != j:
	org += rmix[j:i]
print(org)


a = input()
a = a.replace('WUB', ' ')
for _ in range(70):
	a = a.replace('  ', ' ')
if a[0] == ' ':
	a = a[1:]
print(a)


x = input()
x = x.split('WUB')
x = list(filter(''.__ne__, x))
result = ''
if len(x) > 1:
	for i in x:
		result = result + i + ' '
	result = result[:len(result)]
	print(result)
else:
	print(x[0])


import math
from collections import defaultdict, Counter, deque
INF = float('inf')

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i ** 2 <= n:
		if n % i == 0:
			return i
		i += 1
	return n

def vars():
	return map(int, input().split())

def array():
	return list(map(int, input().split()))

def main():
	s = input()
	ans = s.replace('WUB', ' ').strip().split()
	print(' '.join(ans))
t = 1
for _ in range(t):
	main()


name = input().replace('WUB', ' ').strip()
name = ' '.join(name.split())
print(name)


import re
print(' '.join(re.split('(?:WUB)+', input())).strip())


x = input()
l = x.split('WUB')
ans = ''
for i in l:
	if i != '':
		ans += i + ' '
print(ans)


s = input()
s1 = s.replace('WUB', '0')
B = list(s1.split('0'))
C = [str(x) for x in B if len(x) > 0]
print(' '.join(C))


st = input().replace('WUB', ' ')
ar = []
for i in range(len(st)):
	if st[i] == ' ' and len(ar) == 0:
		continue
	if st[i] == ' ' and ar[-1] == ' ':
		continue
	ar.append(st[i])
if ar[-1] == ' ':
	ar = ar[:-1]
print(''.join(ar))


(a, b, i) = (str(input()), [], 0)
while i < len(a):
	if a[i:i + 3] == 'WUB':
		b.append(' ')
		i += 2
	else:
		b.append(a[i])
	i += 1
while b[0] == ' ':
	del b[0]
while b[len(b) - 1] == ' ':
	del b[len(b) - 1]
i = 1
while i < len(b):
	if b[i] == b[i - 1] and b[i] == ' ':
		del b[i]
	else:
		i += 1
print(''.join(b))


import re
str = input()
list = re.split('WUB', str)
for i in list:
	if i != '':
		print(i + ' ', end='')


song = input()
song = song.replace('WUB', ' ')
while '  ' in song:
	song = song.replace('  ', ' ')
if song[0] == ' ':
	song = song[1:]
print(song)


w = input().split('WUB')
l = len(w)
for i in range(l):
	if w[i] != '':
		print(w[i], end=' ')


input_string = input()
msg = input_string.split('WUB')
output_string = ''
for i in msg:
	if i != '':
		output_string += i + ' '
print(output_string.strip())


T = list(input().split('WUB'))
z = []
for x in range(len(T)):
	if T[x] != '':
		z += [T[x]]
print(' '.join(z))


s = input()
word = s.split('WUB')
t = []
for i in word:
	if not i == '':
		t.append(i)
d = ' '
s = d.join(t)
print(s)


s = input().strip().split('WUB')
s1 = ''
for x in s:
	if x != '':
		s1 += x + ' '
print(s1)


n = list(input().split('WUB'))
a = []
for i in n:
	if i != '':
		a.append(i)
k = ''
for i in a:
	k = k + i + ' '
print(k.strip())


s = input()
s = ' ' + s
i = 1
while i < len(s) - 2:
	if s[i:i + 3] == 'WUB':
		if s[i - 1] == ' ':
			s = s[:i] + s[i + 3:]
		else:
			s = s[:i] + ' ' + s[i + 3:]
			i += 1
	else:
		i += 1
print(s[1:].rstrip())


song = input()
n = len(song)
a = []
s = ''
i = 0
while i < n:
	if i >= n - 2:
		s += song[i]
		if i == n - 1:
			a += [s]
		i += 1
	elif song[i] == 'W' and song[i + 1] == 'U' and (song[i + 2] == 'B'):
		i += 3
		if s:
			a += [s]
		s = ''
	else:
		s += song[i]
		i += 1
print(' '.join(a))


def solve(remixed: str):
	song_name = ''
	idx = 0
	while str.find(remixed, 'WUB') != -1:
		idx = str.find(remixed, 'WUB')
		remixed = remixed[0:idx] + ' ' + remixed[idx + 3:]
	li = remixed.split()
	counter = 1
	for i in li:
		song_name += i
		counter += 1
		if counter != len(li) + 1:
			song_name += ' '
	return song_name

def main():
	remixed = input()
	print(solve(remixed))
main()


s = input().split('WUB')
i = 0
while s.count('') > 0 and i < len(s):
	if s[i] != '':
		i += 1
	else:
		s = s[:i] + s[i + 1:]
print(*s)


s = input().split('WUB')
s = list(filter(''.__ne__, s))
to_print = ' '.join([e for e in s])
print(to_print)


st = input()
l = st.split('WUB')
f = []
for i in range(0, len(l)):
	if l[i] != '':
		f.append(l[i])
print(' '.join(f))


x = input()
z = x.split('WUB')
k = []
for i in z:
	if i != '':
		k.append(i)
print(' '.join(k))


ch = input('')
newch = ''
l = []
l = ch.split('WUB')
for i in l:
	if i != '':
		newch = newch + ' ' + i
print(newch)


mix = input().split('WUB')
for word in mix:
	if word != '':
		print(word, end=' ')


import re
s = input()
s = s.replace('WUB', ' ')
s = re.sub(' +', ' ', s)
if s[0] == ' ':
	s = s[1:]
print(s)


s = input()
s1 = s.replace('WUB', '1')
res = list(s1.split('1'))
for i in range(len(res) - 1):
	if res[i] != '':
		print(res[i], end=' ')
if res[-1] != '':
	print(res[-1])


remix = input()
i = 0
orig = 'A'
space = False
if len(remix) > 1:
	while i + 2 < len(remix):
		if not (remix[i] == 'W' and remix[i + 1] == 'U' and (remix[i + 2] == 'B')):
			orig += remix[i]
			i += 1
			space = True
		else:
			if space:
				orig += ' '
				space = False
			i += 3
	if i + 1 < len(remix) or i < len(remix):
		orig += remix[i:]
else:
	orig += remix
print(orig[1:])


s = input()
s = ' '.join(s.split('WUB'))
s = s.strip()
for k in range(2, len(s) - 2):
	w = ' ' * k
	while s.find(w) != -1:
		s = s.replace(w, ' ')
print(s)


T = input('')
strq = ''
k = 0
a = 0
while k < len(T) - 2:
	if T[k:k + 3] == 'WUB':
		if k != 0 and a == 0:
			strq += ' '
		k += 3
		a += 1
	else:
		a = 0
		strq += T[k]
		k += 1
if k == len(T) - 2 or k == len(T) - 1:
	strq += T[k:]
print(strq)


s = input()
l = 0
while len(s) > 2:
	k = s.find('WUB', l)
	if k != -1:
		if l != k:
			print(s[l:k], end=' ')
		s = s[k + 3:]
	else:
		print(s)
		break
else:
	print(s)


s = input()
s = s.replace('WUB', ' ')
l = list(s)
i = 0
a = []
while i < len(l) - 1:
	if l[i] == l[i + 1] == ' ':
		a.append(i)
	i += 1
a.sort(reverse=True)
for k in a:
	del l[int(k)]
if l[0] == ' ':
	del l[0]
if l[-1] == ' ':
	del l[-1]
s1 = ''.join(l)
print(s1)


n = input()
n = n.replace('WUB', ' ')
n = n.split()
for s in n:
	print(s, end=' ')


string = input()
x = string.split('WUB')
y = []
for i in x:
	if len(i) > 0:
		y.append(i)
	else:
		continue
z = ' '.join(y)
print(z)


import sys
s = sys.stdin.readline().strip()
print(' '.join([a for a in s.split('WUB') if a != '']).strip())


s = input()
a = list(s)
i = 0
st = ''
while len(a) > 0:
	if len(a) < 3:
		st += a[i]
		a.remove(a[i])
	elif a[i] == 'W' and a[i + 1] == 'U' and (a[i + 2] == 'B'):
		a.remove(a[i])
		a.remove(a[i])
		a.remove(a[i])
		st += ' '
	else:
		st += a[i]
		a.remove(a[i])
st = ' '.join(st.split())
print(st)


s = list(input().split('WUB'))
i = 0
t = True
while t:
	if s[i] == '':
		s.pop(i)
		i -= 1
	i += 1
	if i == len(s):
		t = False
print(*s)


j = input()
j = j.replace('WUB', ' ')
j = j.replace('   ', ' ')
j = j.replace('  ', ' ')
print(j.strip(' '))


line = input()
line = line.replace('WUB', ' ', line.count('WUB'))
ans = [str(a) for a in line.split()]
for a in ans:
	print(a, end=' ')


def solve(s):
	s = s.split('WUB')
	x = [i for i in s if i != '']
	return ' '.join(x)

def main():
	s = input()
	print(solve(s))
main()


dubstep = input()
while len(dubstep) >= 3 and dubstep[:3] == 'WUB':
	dubstep = dubstep[3:]
while len(dubstep) >= 3 and dubstep[-3:] == 'WUB':
	dubstep = dubstep[:-3]
dubstep = dubstep.replace('WUB', ' ', len(dubstep))
while dubstep.find('  ') > -1:
	dubstep = dubstep.replace('  ', ' ', len(dubstep))
print(dubstep)


remix = input()
remix = remix.replace('WUB', '.')
remix = remix.split('.')
while '' in remix:
	remix.remove('')
print(' '.join(remix))


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
sys.setrecursionlimit(10 ** 5)

def mod():
	return 10 ** 9 + 7

def i():
	return sys.stdin.readline().strip()

def ii():
	return int(sys.stdin.readline())

def li():
	return list(sys.stdin.readline().strip())

def mii():
	return map(int, sys.stdin.readline().split())

def lii():
	return list(map(int, sys.stdin.readline().strip().split()))

def solve():
	print(' '.join(filter(None, input().split('WUB'))))
for _ in range(1):
	solve()


song = input()
song = song.replace('WUB', ' ')
song = song.split()
new_song = ''
for words in song:
	new_song = new_song + words + ' '
new_song = new_song.strip()
print(new_song)


dubstep = list(map(str, input().split('WUB')))
d = []
for i in dubstep:
	if i != '':
		d += [i]
print(*d)


s = input()
i = 0
c = 0
u = ''
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i += 3
	else:
		if c == i - 1:
			u += s[i]
			c = i
		elif s[1:4] == 'WUB' and i == 0:
			u += s[i]
			c = i
		else:
			u += ' ' + s[i]
			c = i
		i += 1
print(u)


print(' '.join(''.join((x for x in input().replace('WUB', ' '))).strip().split()))


name = input()
newword = name.replace('WUB', ' ')
arr = newword.split(' ')
while '' in arr:
	arr.remove('')
print(*arr)


import string
s = input()
s = s.split('WUB')
for i in s:
	if i != '':
		print(i, end=' ')


a = input()
import re
x = [m.start() for m in re.finditer('WUB', a)]
z = ''
for i in range(0, len(x)):
	if i == len(x) - 1:
		z = z + a[x[i] + 3:]
	else:
		c = a[x[i] + 3:x[i + 1]]
		if c != '':
			z = z + c + ' '
if len(x) > 0:
	if x[0] != 0:
		z = a[0:x[0]] + ' ' + z
else:
	z = a[0:]
print(z)


s = input()
l = len(s)
i = 0
f = False
r = ''
while i < l:
	if s[i:i + 3] == 'WUB':
		i += 3
		f = True
	else:
		if f == True:
			r += ' '
		r += s[i]
		i += 1
		f = False
print(r.strip())


s = input()
o = s.split('WUB')
m = []
for i in o:
	if i != '':
		m.append(i)
x = 0
S = ''
while x < len(m):
	S = S + m[x] + ' '
	x += 1
print(S)


s = input()
op = ''
i = 0
prv = 'b'
while i < len(s):
	if s[i:i + 3] == 'WUB':
		if prv == 'c':
			op += ' '
			prv = 'b'
		i += 3
	else:
		op += s[i]
		i += 1
		prv = 'c'
print(op)


input_str = input()
res = input_str.split('WUB')
final_res = ''
for word in res:
	if word != '':
		final_res += word + ' '
final_res = final_res.rstrip()
print(final_res)


s1 = str(input())
t = s1.find('WUB')
ans = ''
while t != -1:
	if t != 0:
		ans += ' ' + s1[:t]
		s1 = s1[t + 3:]
	else:
		s1 = s1[t + 3:]
	t = s1.find('WUB')
t = ans.find(' ')
while t == 0:
	ans = ans[1:]
	t = ans.find(' ')
print(ans + ' ' + s1)


__author__ = 'Bian'
inp = input().split('WUB')
try:
	for x in range(len(inp)):
		inp.remove('')
except ValueError:
	pass
print(' '.join(inp))


s = input()
s = s.replace('WUB', ' ')
s = s.strip()
n = len(s)
i = 1
s = list(s)
while i < n:
	if s[i - 1] == ' ' and s[i] == ' ':
		s[i - 1] = ''
	i += 1
print(''.join(s).strip())


bakkangsho = input().replace('WUB', ' ')
j = 1
b = []
for i in range(len(bakkangsho) - 1):
	if bakkangsho[i] == ' ' == bakkangsho[i + j]:
		b.append(i)
print(''.join([char for (idx, char) in enumerate(bakkangsho) if idx not in b]))


ss = input()
l = ss.split('WUB')
try:
	i = 0
	while i < len(l):
		if l[i] == '' or l[i] == ' ':
			del l[i]
		else:
			i += 1
except:
	pass
for i in range(0, len(l)):
	print(l[i], end='')
	if i != len(l) - 1:
		print(' ', end='')


import math
from collections import deque

def ii():
	return int(input())

def mii():
	return map(int, input().split())

def matr(n):
	return [list(mii()) for _ in range(n)]
s = input()
print(*s.replace('WUB', ' ').split())


def solve(s):
	x = s.split('WUB')
	x = filter(lambda w: w, x)
	return ' '.join(x)

def main():
	s = input()
	print(solve(s))
main()


n = list(input().split('WUB'))
n
while '' in n:
	n.remove('')
n = ' '.join(n)
print(n)


wubs = input()
wubs = wubs.split('WUB')
wubs = list(filter(lambda a: a != '', wubs))
print(' '.join(wubs))


import re
a = input()
b = re.sub('(WUB)+', ' ', a)
if b[0] == ' ':
	print(b[1:])
else:
	print(b)


output = input().split('WUB')
output2 = ''
for i in output:
	if i != '':
		output2 = output2 + i + ' '
print(output2)


s = input().split('WUB')
l = []
for i in s:
	if i != '':
		l += [i]
print(l[0], end='')
for i in range(1, len(l)):
	print('', l[i], end='')
print()


import re
song = input()
song = re.sub('WUB', ' ', song)
song = re.sub('\\s+', ' ', song)
print(song.strip())


a = input()
str = a.split('WUB')
n = ''
ans = ''
for x in str:
	if x is not n:
		ans += x
		ans += ' '
print(ans)


s = input()
a = s.replace('WUB', '0')
for i in range(0, len(a)):
	if a[i] != '0':
		print(a[i], end='')
		if i < len(a) - 1 and a[i + 1] == '0':
			print(' ', end='')


s = input()
n = len(s)
a = ' '
i = 0
count = 0
while i <= len(s) - 1:
	if i < len(s) - 2:
		check = s[i:i + 3]
	else:
		check = 'BUW'
	if check == 'WUB':
		if a[len(a) - 1] != ' ':
			a += ' '
		else:
			pass
		i += 3
	else:
		a += s[i]
		i += 1
for i in range(len(a)):
	if a[i] != ' ':
		print(a[i:])
		break


from itertools import groupby
S = input()
N = len(S)
remove = []
for i in range(N - 2):
	if S[i:i + 3] == 'WUB':
		remove += [i, i + 1, i + 2]
S = list(S)
ans = ''
for r in remove:
	S[r] = ' '
ans = ''
for (k, v) in groupby(S):
	if k != ' ':
		ans += k * len(list(v))
	else:
		ans += k
if ans[0] == ' ':
	ans = ans[1:]
print(ans)


s = input()
i = 0
n = len(s)
t = ''
sep = 1
while i + 2 < n:
	if s[i:i + 3] == 'WUB':
		i += 3
		if not sep:
			t += ' '
		sep = 1
	else:
		t += s[i]
		sep = 0
		i += 1
if n > 1 and i == n - 2:
	t += s[i]
	t += s[i + 1]
elif n > 0 and i == n - 1:
	t += s[i]
print(t, end='')


s = input()
w = 'WUB'
i = 0
L = []
j = 0
while i < len(s) - 3:
	if s[i:i + 3] == w:
		i = i + 3
		j = i
	else:
		while s[i:i + 3] != w and i < len(s) - 3:
			i = i + 1
		if i < len(s) - 3:
			L.append(s[j:i])
if i >= len(s) - 3:
	if i == len(s) - 3 and s[i:i + 3] == w:
		L.append(s[j:i])
	else:
		L.append(s[j:])
print(*L, sep=' ')


S = input()
s = 'WUB'
S = S.replace(s, ' ')
prev = ' '
ans = ''
for a in S:
	if prev != ' ' or (prev == ' ' and a != ' '):
		ans += a
	prev = a
print(ans)


def Dubstep(text):
	originalSong = text.split('WUB')
	finalSong = ''
	for word in originalSong:
		if word != '':
			finalSong += word
			finalSong += ' '
	return finalSong[:len(finalSong) - 1]
inputText = input()
print(Dubstep(inputText))


import sys
import io
import os
import re
total = 0
failed = 0

def run(test, res):
	x = io.StringIO()
	with io.StringIO(test) as sys.stdin:
		with x as sys.stdout:
			work()
			z = x.getvalue().strip()
	sys.stdout = sys.__stdout__
	print('Passed?', z == res)
	print('Expected: ', res)
	print('Actual  : ', z)
	global total, failed
	total += 1
	failed += 1 if z != res else 0

def work():
	a = input()
	a = re.sub('(WUB)+', ' ', a)
	print(a.strip())

def test():
	run('WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB', 'WE ARE THE CHAMPIONS MY FRIEND')
if 'LOCALTEST' in os.environ:
	test()
	print('\n Result: %s (%d total, %d failed)' % ('FAILED' if failed > 0 else 'PASSED', total, failed))
else:
	work()


s = str(input())
e = s.split('WUB')
answer = ''
for i in range(len(e)):
	if e[i] != '':
		answer += e[i]
		answer += ' '
print(answer)


ch = input()
line = ch.replace('WUB', ' ')
l = list(line.split())
print(' '.join(l))


string = input()
index = 0
convertion = ''
flag = True
while index < len(string):
	if string[index:index + 3] != 'WUB':
		if flag == False:
			convertion += ' '
		convertion += string[index]
		index += 1
		flag = True
	else:
		index += 3
		flag = False
print(convertion.strip())


data = input()
cc = data.count('WUB')
data = data.replace('WUB', ' ', cc).split()
ans = ''
for i in range(len(data)):
	ans += data[i] + ' '
print(ans.strip())


import re

def main():
	str = input()
	str = str.replace('WUB', ' ')
	str = re.sub('\\s{2,}', ' ', str)
	str = str.strip()
	print(str)
main()


s = input()
if len(s) < 3:
	print(s)
else:
	s2 = [' ']
	i = 0
	while i < len(s) - 2:
		if s[i:i + 3] == 'WUB':
			if s2[-1] != ' ':
				s2.append(' ')
			i += 3
		else:
			s2.append(s[i:i + 1])
			i += 1
	if s2[i - 1:] != 'WUB':
		s2.append(s[i:])
	res = ''.join(s2)
	if res[0] == ' ':
		res = res[1:]
	if res[-1] == ' ':
		res = res[:-1]
	print(res)


x = input()
x = x + '  '
n = len(x) - 2
m = 0
y = ''
while m < n:
	if x[m] == 'W' and x[m + 1] == 'U' and (x[m + 2] == 'B'):
		m = m + 3
		if len(y) != 0 and y[len(y) - 1] != ' ':
			y = y + ' '
	else:
		y = y + x[m]
		m = m + 1
print(y)


a = input()
a = a.replace('WUB', '  ')
con = True
while con:
	if '  ' in a:
		a = a.replace('  ', ' ')
	else:
		con = False
start = 0
end = len(a) - 1
if a[0] == ' ':
	start = 1
if a[end] == ' ':
	end -= 1
print(a[start:end + 1])


s = input()
a = ''
l = []
i = 0
while len(s) > 0:
	if len(s) < 3:
		l.append(a + s)
		break
	elif len(s) == 3 and (s[0] != 'W' or s[1] != 'U' or s[2] != 'B'):
		l.append(a + s)
		break
	elif s[0] == 'W' and s[1] == 'U' and (s[2] == 'B'):
		s = s[3:]
		if a == '':
			pass
		else:
			l.append(a)
			a = ''
	else:
		a = a + s[0]
		s = s[1:]
		if len(s) == 0:
			l.append(a)
s1 = ' '.join(l)
print(s1)


x = input() + 'WUB'
lst = ''
i = 0
counter = 0
while i < len(x) - 3:
	if x[i] + x[i + 1] + x[i + 2] == 'WUB':
		i += 2
		if counter > 0:
			lst += ' '
			counter = 0
	else:
		lst += x[i]
		counter += 1
	i += 1
print(lst)


s = list(str(input()).split('WUB'))
m = [i for i in s if i != '']
print(' '.join(m))


song = input()
for chars in song.split('WUB'):
	if chars != '':
		print(chars, end=' ')


def extract(song):
	phrase = ''
	i = 0
	was_normal_word = False
	is_first_letter = True
	length = len(song)
	while i < length:
		if i < length - 2 and song[i] == 'W' and (song[i + 1] == 'U') and (song[i + 2] == 'B'):
			i += 3
			is_first_letter = True
			continue
		else:
			if was_normal_word and is_first_letter:
				phrase += ' '
			phrase += song[i]
			i += 1
			was_normal_word = True
			is_first_letter = False
	return phrase
string = input()
print(extract(string))


S = input()
S = S.split('WUB')
A = ''
for i in S:
	if i != '':
		A += i
		A += ' '
print(A)


l = input().split('WUB')
print(' '.join([x for x in l if x != '']))


n = input()
if 'WUB' in n:
	n = n.replace('WUB', ' ')
n = n.split()
print(' '.join(n))


import re
line = input('')
line = line.replace('WUB', ' ')
line = re.sub(' +', ' ', line).strip()
print(line)


word = input().split('WUB')
org = []
for x in word:
	if len(x) > 0:
		org.append(x)
print(*org, sep=' ')


s = input()
s = s.split('WUB')
z = s.count('')
for k in range(z):
	s.remove('')
print(' '.join(s))


s = input()
i = 0
li = []
s1 = ''
while i < len(s):
	if s[i:i + 3] == 'WUB':
		s1 = s1 + ' '
		i = i + 3
	else:
		s1 = s1 + s[i]
		i = i + 1
li = s1.split()
for i in li:
	print(i, end=' ')


import re
wub = 'WUB'
remix = input()
print(' '.join(' '.join(remix.split(wub)).split()))


s = input()
l = [i for i in s.split('WUB') if i]
print(*l, sep=' ')


s = input()
s = s.replace('WUB', ' ')
l = [x for x in s.split(' ')]
st = ''
for i in l:
	if i != '':
		st += i
		st += ' '
print(st)


s = input()
s = [x for x in s.split('WUB') if len(x) >= 1]
print(' '.join(s))


characters = list(input())
n = len(characters)
words = []
k = 0
s0 = 0
s1 = 0
while k in range(n):
	if n - k >= 3:
		if characters[k] == 'W' and characters[k + 1] == 'U' and (characters[k + 2] == 'B'):
			s1 = k
			if s0 != s1:
				words.append(''.join((characters[l] for l in range(s0, s1))))
			s0 = k + 3
			k += 3
		else:
			k += 1
	else:
		k += 1
		if k == n:
			s1 = k
			words.append(''.join((characters[l] for l in range(s0, s1))))
print(' '.join(words))


n = input().replace('WUB', ' ').split()
for item in n:
	print(item, end=' ')


s = str(input())
t = ''
l = []
i = 0
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i += 3
		if t != '':
			l.append(t)
			t = ''
	else:
		t += s[i]
		i += 1
if t != '':
	l.append(t)
print(*l)


a = input()
a = a.replace('WUB', ' ')
a = a.strip()
b = [char for char in a]
for i in range(len(b) - 1):
	if b[i] == ' ' and b[i + 1] == ' ':
		b[i] = ''
for i in range(len(b)):
	print(b[i], end='')


n = input()
b = n.replace('WUB', ' ')
while '  ' in b:
	b = b.replace('  ', ' ')
print([b, b[1:]][b[0] == ' '])


def main():
	dub = input()
	text = dub.split('WUB')
	print(' '.join([word for word in text if word != '']))
main()


A = input().split('WUB')
ans = A[0]
for i in range(1, len(A)):
	if A[i] != '':
		ans = ans + ' ' + A[i]
if ans[0] == ' ':
	print(ans[1:])
else:
	print(ans)


text = input()
arr = text.split(sep='WUB')
arr = list(filter(lambda a: a != '', arr))
for each in arr:
	print(each, end=' ')


x = input()
x = x.replace('WUB', ' ')
c = x.count(' ')
c2 = 0
while c2 != c:
	c2 = c
	x = x.replace('  ', ' ')
	c = x.count(' ')
if x[0] == ' ':
	print(x[1:200])
else:
	print(x)


first = True
for i in input().split('WUB'):
	if not first:
		print('', end='')
	first = False
	if i != '':
		print(i, end=' ')
print()


x = str(input(''))
l = x.split('WUB')
count = 0
for i in l:
	if i == '':
		count = count + 1
for i in range(0, count):
	l.remove('')
z = ''
for i in l:
	if i != ' ':
		z = z + i + ' '
print(z)


m = input() + 'WUB'
s = ''
l = []
x = 0
while x < len(m):
	if m[x:x + 3] == 'WUB':
		x = x + 3
		if len(s) != 0:
			l.append(s)
			s = ''
	else:
		s = s + m[x]
		x = x + 1
y = ' '.join(l)
print(y)


s = input()
l = s.split('WUB')
a = ' '.join(l)
l = a.split()
a = ' '.join(l)
print(a)


chanson_dub = input()
chanson = chanson_dub.replace('WUB', ' ').strip()
while '  ' in chanson:
	chanson = chanson.replace('  ', ' ')
print(chanson)


string = list(input().split('WUB'))
word = [i for i in string if i != '']
print(' '.join(word))


tmp = ''
s = input().split('WUB')
for i in s:
	if i != '':
		tmp += i + ' '
print(tmp)


print(*[x for x in input().split('WUB') if x != '' and x != '\n'])


l = input()
while True:
	p = l.find('WUB')
	if p == -1:
		break
	if p != 0:
		if l[p - 1] != ' ':
			l = l[:p] + ' ' + l[p + 3:]
		else:
			l = l[:p] + l[p + 3:]
	else:
		l = l[3:]
if l[len(l) - 1] == ' ':
	print(l[:len(l) - 1])
else:
	print(l)


def main():
	s = [a for a in input().split('WUB')]
	while '' in s:
		s.remove('')
	for word in s:
		print(word, end=' ')
main()


import sys

def solve(s):
	return ' '.join((w for w in s.split('WUB') if w))

def print_stderr(*args, **kwargs):
	print(*args, file=sys.stderr, **kwargs)

def main():
	s = input().strip()
	result = solve(s)
	print(result)
main()


def solve(s):
	if 'WUB' in s:
		s = s.replace('WUB', ' ')
	s = s.split()
	return ' '.join(s)
s = input()
print(solve(s))


def d():
	r = input().strip()
	s = 'WUB'
	k = []
	s1 = r.split(s)
	s2 = str()
	for i in range(len(s1)):
		if s1[i] != '':
			s2 += s1[i] + ' '
	print(s2)
d()


x = input().split('WUB')
r = ''
for i in range(len(x)):
	if x[i] != '':
		r = r + str(x[i]) + ' '
print(r)


dubstep = input()
dubstep = dubstep.replace('WUB', ' ')
print(' '.join(dubstep.split()))


l = input().split('WUB')
m = []
for i in l:
	if i != '':
		m.append(i)
print(' '.join(m))


list = input().split('WUB')
result = ''
for word in list:
	if not word:
		continue
	result += word + ' '
result = result[:len(result) - 1]
print(result)


s = list(input().split('WUB'))
while s.count(''):
	s.remove('')
print(' '.join(s))


remix = input()
remix = remix.replace('WUB', ' ')
remix.strip()
o = ' '.join(remix.split())
print(o)


n = input().split('WUB')
for each in range(n.count('')):
	n.remove('')
print(*n)


string = input()
l = len(string)
s = ''
idx = 0
f = 0
while idx < l:
	if string[idx:idx + 3] != 'WUB':
		if f == 1:
			s += ' '
		s += string[idx]
		f = 0
		idx += 1
	else:
		f = 1
		idx += 3
print(s.strip(' '))


s = input()
lst = s.split('WUB')
x = lst.count('')
for i in range(x):
	lst.remove('')
print(' '.join(lst))


dub = input()
dub = dub.split('WUB')
final = ''
for i in dub:
	if len(i) > 0:
		final = final + i + ' '
print(final[0:len(final) - 1])


lis = input().split('WUB')
lis = [x for x in lis if len(x) > 0]
print(' '.join(lis))


name = [str(m) for m in input().split('WUB')]
for i in range(len(name)):
	if name[i] != '':
		print(name[i], end=' ')


s = input().split('WUB')
ans = ''
for i in range(len(s)):
	if s[i] == '':
		continue
	ans += s[i] + ' '
if ans[-1] == ' ':
	print(ans[:-1])
else:
	print(ans)


s = input().replace('WUB', ' ').strip()
i = 0
s2 = list(s)
while i < len(s2) - 1:
	if s2[i] == s2[i + 1] == ' ':
		del s2[i + 1]
	else:
		i = i + 1
print(''.join(s2))


arr = [str(x) for x in input().split('WUB') if len(str(x)) > 0]
for i in arr:
	print(i, end=' ')


def fun(n):
	d = 'WUB'
	r = n.split(d)
	rs = ' '.join([i for i in r if i != ''])
	return rs
n = input().strip()
print(fun(n))


s = input()
s = s.replace('WUB', ' ')
s = list(s)
n = len(s)
i = 0
while i < n:
	if s[i] == ' ':
		del s[i]
	else:
		break
m = len(s)
while i < m - 1:
	if s[i] == ' ' and s[i + 1] == ' ':
		del s[i + 1]
		m = m - 1
	else:
		i = i + 1
s = ''.join(s)
print(s)


str = input()
n = len(str)
temp = 'WUB'
i = 0
ans = []
find = ''
bool = False
while i < n:
	if str[i:i + 3] == temp:
		if bool:
			ans.append(find)
			find = ''
			bool = False
		i += 3
	else:
		find += str[i]
		i += 1
		bool = True
else:
	if bool:
		ans.append(find)
print(' '.join(ans))


s = input()
s = s.replace('WUB', ' ')
s = s.strip()
arr = s.split(' ')
ans = ''
for ele in arr:
	if ele != '':
		ans += ele
		ans += ' '
ans = ans.strip()
print(ans)


oldStr = input() + '  '
newStr = ''
lengthOfStr = len(oldStr) - 2
space = False
i = 0
while i < lengthOfStr:
	if oldStr[i] == 'W' and oldStr[i + 1] == 'U' and (oldStr[i + 2] == 'B'):
		i += 2
		if space:
			newStr += ' '
			space = False
	else:
		newStr += oldStr[i]
		space = True
	i += 1
print(newStr)


def main():
	s = input()
	i = 0
	ans = ''
	while i < len(s):
		if i + 3 <= len(s) and s[i:i + 3] == 'WUB':
			i += 3
			ans += ' '
			pass
		else:
			ans += s[i]
			i += 1
	ans = ' '.join(list(ans.split()))
	print(ans)
	return 0
main()


s = input()
word = False
x = s.find('WUB')
res = []
while x != -1:
	if x > 0:
		res.append(s[:x])
	s = s[x + 3:]
	x = s.find('WUB')
if len(s):
	res.append(s)
print(' '.join(res))


s = input()
res = ''
i = 0
while i < len(s):
	if s[i:i + 3] != 'WUB':
		res += s[i]
		i += 1
	else:
		i += 3
		res += ' '
sec = res.split()
print(*sec)


a = input()
output_lst = []
start_index = 0
WUB_index = 0
while True:
	WUB_index = a.find('WUB')
	if WUB_index == 0:
		start_index = WUB_index + 3
		a = a[start_index:]
	if WUB_index != 0:
		if WUB_index == -1:
			output_lst.append(a)
			break
		output_lst.append(a[:WUB_index])
		a = a[WUB_index:]
	if WUB_index == -1:
		break
print(*output_lst)


word = input()
sentence = ''
for i in word.split('WUB'):
	if i != '':
		sentence += i + ' '
print(sentence)


def printing(A):
	for i in range(len(A)):
		print(A[i], end='')
string = list(input())
for i in range(len(string) - 2):
	if string[i] == 'W' and string[i + 1] == 'U' and (string[i + 2] == 'B'):
		string[i] = ' '
		string[i + 1] = ' '
		string[i + 2] = ' '
for i in range(len(string)):
	if string[i] == ' ':
		string[i] = ''
	else:
		break
for i in range(len(string) - 1, -1, -1):
	if string[i] == ' ':
		string[i] = ''
	else:
		break
status = False
for i in range(len(string)):
	if string[i] != ' ' and string[i] != '':
		status = True
	elif status == False:
		string[i] = ''
	else:
		string[i] = ' '
		status = False
printing(string)


(wub, i, nonwub, head) = ('WUB', 0, '', '')
for c in input() + 'WUB':
	if c == wub[i]:
		head += c
		i += 1
	else:
		nonwub += head
		if c != 'W':
			nonwub += c
			head = ''
			i = 0
		else:
			head = 'W'
			i = 1
	if i == 3:
		if len(nonwub) > 0 and nonwub[-1] != ' ':
			nonwub += ' '
		head = ''
		i = 0
print(nonwub.rstrip())


s = input()
l = len(s)
i = 0
res = []
result = ''
while i < l:
	if i + 2 < l and s[i] + s[i + 1] + s[i + 2] == 'WUB':
		i += 3
	elif i + 3 < l and s[i + 1] + s[i + 2] + s[i + 3] == 'WUB':
		if i + 3 != l - 1:
			result += s[i] + ' '
		else:
			result += s[i]
		i += 4
	else:
		result += s[i]
		i += 1
print(result)


l = list(input())
j = 0
t = ''
p = []
while j < len(l):
	if j + 2 < len(l) and l[j] == 'W' and (l[j + 1] == 'U') and (l[j + 2] == 'B'):
		j += 3
		if t != '':
			print(t, end=' ')
		t = ''
	else:
		t += l[j]
		j += 1
if len(l) < 3 or l[-3] != 'W' or l[-2] != 'U' or (l[-1] != 'B'):
	if t != '':
		print(t, end=' ')


um = input().replace('WUB', ' ').split(' ')
kek = []
for n in um:
	if n != '':
		kek.append(n)
print(' '.join(kek))


s = input()
d = ''
d = s.split('WUB')
for i in d:
	if i != '':
		print(i, end=' ')


import string
print(*' '.join(input().split('WUB')).strip().split())


(words, new) = (input().split('WUB'), [])
for i in words:
	if i != '':
		print(i, end=' ')


str = input().split('WUB')
str = list(filter(None, str))
print(' '.join(str))


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
n = input()
a = n.split('WUB')
while '' in a:
	a.remove('')
print(*a)


n = input().split('WUB')
s = ''
for k in range(len(n)):
	if n[k] != '':
		s += n[k] + ' '
print(s)


a = input().split('WUB')
c = ''
i = 0
j = 0
while i < len(a):
	if a[j] == '':
		j += 1
	else:
		c += a[j] + ' '
		j += 1
	i += 1
print(c)


x = input().split('WUB')
y = 0
a = []
for s in x:
	if s != '':
		y += 1
		a.append(s)
for d in range(y):
	if d != y - 1:
		print(a[d], end=' ')
	else:
		print(a[d])


s = input()
s = s.replace('WUB', ' ')
list1 = s.split()
print(*list1)


def main():
	st = input()
	st = st.replace('WUB', ' ')
	st1 = ' '.join(st.split())
	print(st1)
main()


n = input()
w = n.split('WUB')
while '' in w:
	w.remove('')
print(' '.join(w))


pal = input()
s = pal.replace('WUB', ' ')
a = ''
if s[0] != ' ':
	a += s[0]
for i in range(1, len(s)):
	if not (s[i - 1] == ' ' and s[i] == ' '):
		a += s[i]
print(a)


a = input()
lis = a.replace('WUB', ' ').split()
for st in lis:
	print(st, end=' ')


foo = input()
bar = foo.split('WUB')
bar = list(filter(None, bar))
print(' '.join(bar))


songStr = input()
checkStr = 'WUB'
i = 0
possWord = []
wordList = []
checkWord = []
for char in songStr:
	if char == checkStr[i]:
		checkWord.append(checkStr[i])
		i += 1
	elif char == 'W':
		checkWord = ['W']
		i = 1
	else:
		checkWord = []
		i = 0
	possWord.append(char)
	if checkWord == list(checkStr):
		if possWord != checkStr:
			wordList.append(possWord[:len(possWord) - 3])
		possWord = []
		checkWord = []
		i = 0
wordList.append(possWord)
words = []
for wordPieces in wordList:
	if wordPieces != []:
		words.append(''.join(wordPieces))
print(' '.join(words))


s = input()
ans = ''
arr = s.split('WUB')
for a in arr:
	if a != '':
		ans += a + ' '
print(ans)


stri = input()
lst = stri.split('WUB')
s = []
for item in lst:
	if item != '':
		s.append(item)
print(' '.join(s))


s = str(input())
s = s.replace('WUB', '.')
d = 0
e = ''
for i in range(0, len(s)):
	if s[i] == '.':
		d = d + 1
		if d <= 1:
			e = e + ' '
	elif s[i] != '.':
		d = 0
		e = e + s[i]
print(e)


s = input()
s = s.replace('WUB', ' ')
words = []
for w in s.split(' '):
	if w != '':
		words.append(w)
print(' '.join(words))


mix = input().split('WUB')
for i in mix:
	if len(i) != 0:
		print(i, end=' ')


remix = str(input())
remix = remix.replace('WUB', ' ')
remix.strip()
s = ' '.join(remix.split())
print(s)


N = input().split('WUB')
blyat = [x for x in N if x != '']
print(' '.join(blyat))


s = input()
i = 0
r = ''
w = False
while i < len(s):
	if i <= len(s) - 3 and s[i:i + 3] == 'WUB':
		if w:
			r += ' '
			w = False
		i += 3
	else:
		r += s[i]
		i += 1
		w = True
print(r)


st = input().strip().replace('WUB', ' ').strip().replace('  ', ' ')
for (id, x) in enumerate(st):
	if x == ' ' and st[id - 1] == ' ':
		continue
	print(x, end='')


s = input()
arr = []
if 'WUB' in s:
	s = ''.join(s.replace('WUB', ' '))
print(' '.join(s.split()))


line = input()
line = line.split('WUB')
for item in line:
	if item != '':
		print(item, end=' ')


def main():
	line = input()
	line = line.replace('WUB', ' ').strip()
	l = line.split()
	print(' '.join(l))
main()


a = input().split('WUB')
for i in range(len(a) - 1, -1, -1):
	if a[i]:
		b = i
		break
for i in range(0, b):
	if a[i]:
		print(a[i], end=' ')
print(a[b])


dupstep_song = input()
dup = 'WUB'
song = dupstep_song.split(dup)
while '' in song:
	song.remove('')
print(' '.join(song), end='')


s = input()
res = ''
i = 0
needSpace = False
while i < len(s):
	if i < len(s) - 2 and s[i:i + 3] == 'WUB':
		i += 3
		needSpace = True
	else:
		if needSpace and len(res) > 0:
			res += ' '
		res += s[i]
		needSpace = False
		i += 1
print(res)


def Convertir(A):
	NA = []
	for K in A:
		NA = NA + [K]
	return NA
Dat = input()
Cad = Convertir(Dat)
Cad = Cad + ['']
Cad = Cad + ['']
Cad = Cad + ['']
Res = ''
K = 0
while K < len(Cad) - 3:
	if Cad[K] == 'W' and Cad[K + 1] == 'U' and (Cad[K + 2] == 'B'):
		if len(Res) != 0:
			Res = Res + ' '
		K = K + 3
	else:
		Res = Res + str(Cad[K])
		K = K + 1
Res = Res.split()
X = ''
for K in range(len(Res)):
	if K != len(Res) - 1:
		X = X + Res[K] + ' '
	else:
		X = X + Res[K]
print(X)


n = input().split('WUB')
s = ''
for i in n:
	if i == '':
		pass
	else:
		s = s + i + ' '
print(s[:-1])


s = input()
first = 0
last = 0
s = s.replace('WUB', ' ')
s = s.split()
s = ' '.join(s)
print(s, sep=' ')


string = input()
x = string.split('WUB')
a = []
for i in x:
	if i != '':
		a.append(i)
print(*a)


s = input().replace('WUB', ' ')
n = s.count(' ')
for i in range(n):
	if '  ' in s:
		s = s.replace('  ', ' ')
print(s.strip())


word = str(input()).split('WUB')
while True:
	try:
		word.remove('')
	except:
		break
print(' '.join(word))


def Main():
	lyrc = input()
	i = 0
	ans = ''
	while i < len(lyrc):
		while i < len(lyrc) - 2 and lyrc[i] == 'W' and (lyrc[i + 1] == 'U') and (lyrc[i + 2] == 'B'):
			i += 3
		if len(ans) > 0 and i < len(lyrc):
			ans += ' '
		j = i
		while j < len(lyrc):
			if lyrc[j] == 'W' and j + 1 < len(lyrc) and (lyrc[j + 1] == 'U') and (j + 2 < len(lyrc)) and (lyrc[j + 2] == 'B'):
				break
			ans += lyrc[j]
			j += 1
		i = j
	print(ans)
Main()


s = input()
S = s.split('WUB')
Ns = []
for i in S:
	if i:
		Ns.append(i)
print(' '.join(Ns).strip())


a = input()
b = a.split('WUB')
for i in b:
	if i != '':
		print(i, end=' ')


s = str(input())
a = len(s)
b = ''
i = 0
z = 0
while i < a:
	if s[i:i + 3] == 'WUB':
		if z == 1:
			b += ' '
			z = 0
			i += 3
		else:
			z = 0
			i += 3
	else:
		b += s[i]
		z = 1
		i += 1
print(b)


s = input()
n = len(s)
i = int(0)
t = ''
back = ' '
while i < n:
	if i < n - 2 and s[i] == 'W' and (s[i + 1] == 'U') and (s[i + 2] == 'B'):
		if back != ' ' and i != n - 3:
			back = ' '
			t = t + ' '
		i = i + 3
	else:
		back = s[i]
		t = t + s[i]
		i = i + 1
print(t)


st = input()
st = list(st.replace('WUB', ',').strip(','))
for i in range(len(st) - 1):
	if st[i] == ',' and st[i + 1] != ',':
		st[i] = ' '
for i in st:
	if i != ',':
		print(i, end='')


n = input().split('WUB')
l = list(filter(None, n))
print(' '.join(l))


t = input().split('WUB')
w = ''
h = ''
for i in t:
	if i != '':
		w += h + ' '
		h = i
w += h
print(w.strip())


l = list(input())
i = 0
ans = ''
while i < len(l):
	if l[i] == 'W' and i < len(l) - 2:
		if l[i + 1] == 'U' and l[i + 2] == 'B':
			i += 3
			if len(ans) > 0:
				if ans[len(ans) - 1] != ' ':
					ans += ' '
		else:
			ans += l[i]
			i += 1
	else:
		ans += l[i]
		i += 1
print(ans)


a = input()

def x():
	global w
	global a
	w += 'WUB'
	if w not in a:
		w = w[0:-3]
		a = a.replace(w, ' ', 1)
	else:
		x()
while 'WUB' in a:
	w = ''
	x()
print(a.strip())


import re
dub_music = input()
s = re.sub('WUB', ' ', dub_music).strip()
ss = s.split(' ')
for i in ss:
	if i != '':
		print(i, end=' ')


t = input()
s = t.replace('WUB', '/')
r = ''
flag = 0
for i in s:
	if flag == 1 and i == '/':
		r += ' '
		flag = 0
	elif i != '/':
		r = r + i
		flag = 1
print(r)


rifat = input()
rifat = rifat.replace('WUB', ' ')
rifat = rifat.split()
ans = ''
for word in rifat:
	ans += word + ' '
ans = ans.strip()
print(ans)


track = str(input())
track_split = track.split('WUB')
final_track = ''
for track in track_split:
	if track != '':
		final_track = final_track + track + ' '
print(final_track.strip())


s = input()
l = s.split('WUB')
for ele in l:
	if ele != '':
		print(ele, end=' ')


a = input()
x = str()
b = a.split('WUB')
for i in b:
	if i != '':
		x = x + i
		x = x + ' '
print(x)


s = input()
delimiter = 'WUB'
t = s.split(delimiter)
new_s = []
for i in range(len(t)):
	if t[i] != '':
		new_s.append(t[i])
		new_s.append(' ')
part = new_s[0:int(len(new_s) - 1)]
final = ''
for j in part:
	final = final + j
print(final)


s = input()
x = s.replace('WUB', '$')
y = ''
l = []
i = 0
while x[i] == '$':
	i += 1
	pass
while i < len(x):
	y = ''
	while i < len(x):
		if x[i] != '$':
			y += x[i]
		else:
			break
		i += 1
	l.append(y)
	while i < len(x):
		if x[i] == '$':
			i += 1
		else:
			break
print(' '.join(l))


s = str(input())
s = s.split('WUB')
ans = str()
for el in s:
	if el != '':
		ans += ' ' + el
print(ans[1:])


s = input()
s = s.replace('WUB', ' ')
while s.count('  ') > 0:
	s = s.replace('  ', ' ')
if s[0] == ' ' or s[-0] == ' ':
	s = s.replace(' ', '', 1)
print(s)


s = input()
music = [word for word in s.split('WUB') if word != '']
print(' '.join(music))


s = input()
a = []
n = len(s)
flag = 0
i = 0
while i < n:
	if s[i:i + 3] == 'WUB':
		i = i + 3
	else:
		break
while i < n:
	if s[i:i + 3] == 'WUB':
		i = i + 3
	else:
		if s[i - 3:i] == 'WUB' and flag == 1:
			a.append(' ')
		flag = 1
		a.append(s[i])
		i = i + 1
print(''.join(a))


s = input()
s = s.replace('WUB', ' ').split()
rs = ''
for i in s:
	rs += i + ' '
print(rs[:-1])


s = input().strip()
n = len(s)
tmp = ''
i = 0
while i < n:
	if s[i] == 'W' and i + 3 <= n and (s[i:i + 3] == 'WUB'):
		if len(tmp) > 0:
			print(tmp, end=' ')
		tmp = ''
		i += 3
	else:
		tmp += s[i]
		i += 1
if len(tmp) > 0:
	print(tmp)


word = input().split('WUB')
res = ''
for w in word:
	if w != '':
		res += w + ' '
print(res)


s = input()
from re import *
print(sub(' \\Z', '', sub('\\A ', '', sub('\\s+', ' ', sub('WUB', ' ', s)))))


n = input()
re = n.split('WUB')
while '' in re:
	re.remove('')
fi = ' '.join(re)
print(fi)


s = input()
li = s.split('WUB')
string = ''
for ele in li:
	if ele != '':
		string += ele + ' '
print(string)


word = str(input(''))
l = word.split('WUB')
size = len(l)
w = ''
for items in l:
	if not items == '':
		w = w + ' ' + items
w = w.strip(' ')
print(w, end='')


s = input()
l = len(s)
s = s + 'WUB'
ns = ''
i = 0
while s[i:i + 3] == 'WUB':
	i += 3
i0 = i
while i < l:
	while s[i:i + 3] == 'WUB':
		i += 3
	if i0 != i:
		ns += ' '
	if i < l:
		ns += s[i]
		i += 1
		i0 = i
print(ns)


s = input()
s = s.split('WUB')
n = s.count('')
for i in range(n):
	s.remove('')
print(' '.join(s))


a = input()
a = a.replace('WUB', '   ')
a = a.lstrip()
a = a.rstrip()
flag = 0
b = ''
c = []
for i in range(len(a)):
	if a[i] != ' ':
		b += a[i]
	else:
		c.append(b)
		b = ''
	if i == len(a) - 1:
		c.append(b)
for i in range(len(c)):
	if c[i] != '':
		print(c[i], end=' ')


def func(n):
	x = n.split('WUB')
	y = ''
	for i in x:
		if i != '':
			y += i + ' '
	print(y.rstrip())
n = input()
func(n)


def calc(wub):
	return ' '.join([x for x in wub.replace('WUB', ' ').split() if x])
wub = input()
print(calc(wub))


n = input()
j = 0
x = 0
l = 0
for i in n:
	if x == 1:
		x = 2
		if l != 0:
			print(' ', end='')
	if i == 'W':
		if j == 1:
			print('W', end='')
			l = 1
			x = 0
		elif j == 2:
			print('WU', end='')
			l = 1
			x = 0
		j = 1
		continue
	elif i == 'U' and j == 1:
		j = 2
		continue
	elif i == 'B' and j == 2:
		if x == 0:
			x = 1
		j = 0
		continue
	if j == 1:
		print('W', end='')
	elif j == 2:
		print('WU', end='')
	print(i, end='')
	l = 1
	j = 0
	x = 0
if x == 1:
	x = 0
	if l == 0:
		l = 1
	else:
		print(' ', end='')
if j == 1:
	print('W', end='')
elif j == 2:
	print('WU', end='')


s = list(input().split('WUB'))
q = ''
for i in range(0, len(s)):
	if s[i] != '':
		q = q + s[i] + ' '
print(q[:-1])


s = input()
while True:
	if s[:3] == 'WUB':
		s = s.replace('WUB', '', 1)
	else:
		break
s = s.replace('WUB', ' ')
i = 68
while i > 0:
	s = s.replace(' ' * i, ' ')
	i = i - 1
s = s.rstrip()
print(s)


s = input()
s = s.replace('WUB', ' ').strip()
i = 2
while ' ' * i in s:
	s = s.replace(' ' * i, ' ')
print(s)


s = input()
arr = []
tp = []
i = 0
while i < len(s):
	if len(s[i:]) < 3:
		tp.append(s[i])
		i += 1
	elif s[i] != 'W' or s[i + 1] != 'U' or s[i + 2] != 'B':
		tp.append(s[i])
		i += 1
	else:
		i += 3
		x = ''.join(tp)
		if x != '':
			arr.append(x)
			tp = []
	if i == len(s):
		x = ''.join(tp)
		if x != '':
			arr.append(x)
			tp = []
print(' '.join(arr))


s = str(input())
l = s.split('WUB')
for q in l:
	if q == '':
		continue
	print(q, end=' ')


raw_input = input().split(sep='WUB')
for l in raw_input:
	if not l:
		continue
	print(l, end=' ')


s = input().split('WUB')
b = []
for i in s:
	if i:
		b.append(i)
print(' '.join(b))


def getstr(s):
	k = s.split('WUB')
	res = ''
	for x in k:
		if x != '':
			res += x + ' '
	return res[:-1]
s = input()
print(getstr(s))


str = input()
str = str.replace('WUB', ' ')
s = list(str)
sz = len(s) - 1
for i in range(0, sz):
	if s[i] == ' ' and s[i + 1] == ' ' or (s[i] == ' ' and i == 0):
		s[i] = ''
s = ''.join(s)
s = s.lstrip()
s = s.rstrip()
print(s)


sentence = list(input())
i = 2
counter = 0
k = len(sentence)
while i != 0 and 0 < k:
	if k >= 3:
		if sentence[i - 2] == 'W' and sentence[i - 1] == 'U' and (sentence[i] == 'B'):
			sentence.pop(i - 2)
			sentence.pop(i - 2)
			sentence.pop(i - 2)
			k -= 3
		else:
			i = 0
	else:
		print(sentence[i - 2], end='')
		sentence.pop(i - 2)
		k -= 1
k = len(sentence)
while k > 0:
	if k >= 3:
		if sentence[k - 3] == 'W' and sentence[k - 2] == 'U' and (sentence[k - 1] == 'B'):
			sentence.pop(k - 1)
			sentence.pop(k - 2)
			sentence.pop(k - 3)
			k -= 3
		else:
			k = 0
	else:
		print(sentence[k - 2], end='')
		sentence.pop(k - 2)
		k -= 1
k = len(sentence)
j = 2
while 0 < k:
	if k >= 3:
		if sentence[j - 2] == 'W' and sentence[j - 1] == 'U' and (sentence[j] == 'B'):
			sentence.pop(j - 2)
			sentence.pop(j - 2)
			sentence.pop(j - 2)
			counter += 1
			k -= 3
		else:
			if counter != 0:
				print(end=' ')
				counter = 0
			print(sentence[j - 2], end='')
			sentence.pop(j - 2)
			k -= 1
	else:
		if counter != 0:
			print(end=' ')
			counter = 0
		print(sentence[j - 2], end='')
		sentence.pop(j - 2)
		k -= 1


import re
s = input()
m = re.split('WUB', s)
mc = ' '.join([i for i in m if i is not ''])
print(mc)


s = str(input())
t = ''
c = 0
for i in s:
	if 'WUB' in s:
		b = s.index('WUB', c)
		if b == 0:
			s = s[:b] + s[b + 3:]
		elif s[b - 1] != ' ':
			s = s[:b] + ' ' + s[b + 3:]
		else:
			s = s[:b] + s[b + 3:]
		c = b
print(s)


str1 = input()
str2 = str1.replace('WUB', ' ')
str2.strip()
print(' '.join(str2.split()))


st = input()
st = st.replace('WUB', ' ')
st = st.split()
for i in range(len(st)):
	print(st[i], end=' ')


x = input().split(sep='WUB')
l = []
for i in x:
	if i != '':
		l.append(i)
for i in l:
	print(i, end=' ')


modifiedstring = input()
modstr = modifiedstring.replace('WUB', ' ')
modstr = modstr.split()
print(' '.join(modstr))


string = input()
while string[:3] == 'WUB':
	string = string[3:]
while string[-3:] == 'WUB':
	string = string[:-3]
frases = string.split('WUB')
frases = [s for s in frases if s != '']
print(' '.join(frases))


inputstr = input()
ar = inputstr.split('WUB')
while '' in ar:
	ar.remove('')
s = ' '.join(ar)
print(s)


s1 = input()
s = [i for i in s1]
n = len(s)
l = []
judge = 0
i = 0
while i < n:
	if i < n - 2:
		if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
			judge = 1
			i = i + 3
		else:
			judge = 0
			l.append(s[i])
			i = i + 1
	else:
		l.append(s[i])
		judge = 0
		i += 1
	if judge and len(l) > 0 and (l[-1] != ' '):
		l.append(' ')
if l[-1] == ' ':
	l.pop(-1)
str = ''.join(l)
print(str)


import os
s = input()
s = s.split('WUB')
t = []
for ele in s:
	if ele != '':
		t.append(ele)
for ele in t[:-1]:
	if ele != '':
		print(ele + ' ', end='')
print(t[-1], end='')


x = list(map(str, input().split('WUB')))
while '' in x:
	x.remove('')
print(' '.join(x))


txt = list(input().split('WUB'))
st = ''
list1 = [e for e in txt if e not in ['']]
for i in list1:
	st = st + ' ' + i
print(st[1:])


string = input()
haha = []
for i in range(len(string)):
	if 'WUB' in string[i:i + 3]:
		string = string.replace('WUB', ' ')
result = string.split(' ')
for i in result:
	if i != '':
		haha.append(i)
final = ' '.join(haha)
for i in final:
	print(i, end='')


word = input()
word = word.replace('WUB', ' ')
word = word.split()
tmp = word.pop()
resultado = ''
for item in word:
	resultado += item + ' '
resultado += tmp
print(resultado)


a = list(input())
for i in range(len(a) - 2):
	if a[i] == 'W' and a[i + 1] == 'U' and (a[i + 2] == 'B'):
		a[i] = ''
		a[i + 1] = ''
		a[i + 2] = ' '
print(*''.join(a).split())


s1 = input()
s2 = 'WUB'
i = 0
c = 1
while i != len(s1):
	if len(s1) - i < 3:
		print(s1[i], end='')
		i = i + 1
		continue
	if s1[i] + s1[i + 1] + s1[i + 2] == 'WUB':
		if c == 0:
			print(' ', end='')
		c += 1
		i = i + 3
	else:
		print(s1[i], end='')
		i = i + 1
		c = 0


s = input()
first = True
while len(s) > 0:
	i = 0
	while i == 0:
		i = s.find('WUB')
		if i == 0:
			s = s[3:]
	if first:
		first = False
	else:
		print(' ', end='')
	if i > 0:
		print(s[0:i], end='')
		s = s[i:]
		i = 0
	else:
		print(s, end='')
		s = ''
		i = 1


import re
s = input().replace('WUB', ' ')
s = s.lstrip().rstrip()
print(re.sub('\\s{2,}', ' ', s))


n = input()
r = ''
i = 0
x = []
x.append('')
while i < len(n):
	r += n[i]
	if 'WUB' in r:
		r = ''
		x.append(n[:i - 2])
		n = n[:i - 2] + n[i + 1:]
		k = i + 1
		i -= 2
	else:
		i += 1
x.append(n)
j = []
v = len(x)
i = 0
while i < v - 1:
	if x[i] == x[i + 1]:
		x.pop(i + 1)
		v -= 1
	else:
		i += 1
j = []
for i in range(1, len(x)):
	s = len(x[i - 1])
	b = x[i]
	j.append(b[s:])
print(*j)


inputstr = input()
ar = inputstr.split('WUB')
ar2 = list(filter(None, ar))
print(' '.join(ar2))


class Solution(object):
	answer: str

	def __init__(self):
		self.s = input()
		self.answer = ''
		while True:
			a = list(self.s)
			i = self.s.find('WUB')
			if i < 0:
				self.answer = Solution.create_answer(a)
				break
			for j in range(3):
				a[i + j] = ' '
			self.s = ''.join(a)
		print(self.answer)
	pass

	@classmethod
	def create_answer(cls, a):
		s = ''.join(a).strip()
		a = s.split()
		s = ' '.join(a)
		return s
		pass

def main():
	Solution()
	pass
main()


v = input()
s = ''
f = 0
ff = 0
i = 0
while i < len(v):
	if v[i:i + 3] != 'WUB':
		ff = 1
		if f and ff:
			f = 0
			s += ' '
		s += v[i]
		i += 1
	else:
		if ff:
			f = 1
		i += 3
print(s)


word = input().split('WUB')
reword = ''
for i in word:
	if i == '':
		continue
	else:
		reword += i + ' '
print(reword[:-1])


n = input()
f = int(1)
l = []
n = n.replace('WUB', ' ')
for i in n:
	if i == ' ':
		f += 1
	else:
		f = 0
	if f >= 2:
		continue
	else:
		l.append(i)
print(''.join(l))


import re
S = input()
R = S.split('WUB')
R = [x for x in R if x]
print(' '.join(R))


def dubstep():
	words = input().split('WUB')
	return ' '.join([word for word in words if word])
print(dubstep())


S = str(input())
if len(S) >= 1 and len(S) <= 200:
	b = S.split('WUB')
	c = ' '.join((c for c in b if c != ''))
	print(c)


str = input()
str = str.split('WUB')
for ch in str:
	if ch != '':
		print(ch, end=' ')


line = input()
print(*[i for i in line.split('WUB') if len(i) != 0])


from collections import deque
from heapq import heappush, heappop
import re

def ss_raw():
	return input().split()

def ints_raw():
	return list(map(int, ss_raw()))
INF = 1 << 29

def main():
	S = input()
	ans = re.sub('(WUB)+', ' ', S)
	return ans.strip()
print(main())


string = input()
ans = string
count = string.find('WUB')
while count != -1:
	ans = ans[0:count] + ' ' + ans[count + 3:]
	count = ans.find('WUB')
ans = ans.lstrip()
ans = ans.rstrip()
ans2 = ''
i = 0
count = 0
while i < len(ans):
	if ans[i] == ' ':
		count += 1
		i += 1
	else:
		if count != 0:
			ans2 = ans2 + ' '
			count = 0
		ans2 += ans[i]
		i += 1
print(ans2)


s = input()
s = s.replace('WUB', ' ')
ss = s.split(' ')
ss = filter(lambda x: x, ss)
print(' '.join(ss))


ly = input()
j = []
for i in range(len(ly) - 2):
	if ly[i:i + 3] == 'WUB':
		j.append(i)
j.append(len(ly))
if j[0] > 0:
	print(ly[0:j[0]], end=' ')
for l in range(len(j) - 1):
	if j[l + 1] - j[l] > 3:
		print(ly[j[l] + 3:j[l + 1]], end=' ')


s = [x for x in input().split('WUB')]
ans = ''
for x in s:
	if x != '':
		ans += x + ' '
print(ans.rstrip())


str1 = input().replace('WUB', ' ')
list1 = [x for x in str1.split()]
str2 = ''
for x in list1:
	str2 += x + ' '
print(str2.strip())


text = input().split(sep='WUB')
text = ' '.join(filter(lambda x: len(x) > 0, text))
print(text)


mixword = input()
n = mixword.count('WUB')
word = []
word1 = []
if n > 0:
	for i in range(n):
		split = list(mixword.partition('WUB'))
		if split[0] == '':
			word1.append(split[0])
		else:
			word.append(split[0])
		if i == n - 1:
			if split[2] == '':
				word1.append(split[2])
			else:
				word.append(split[2])
		mixword = split[2]
	print(' '.join(word))
else:
	print(mixword)


a = input()
s = ''
k = len(a)
m = 0
i = 0
while i < k:
	if i < k and i + 1 < k and (i + 2 < k) and (a[i] == 'W') and (a[i + 1] == 'U') and (a[i + 2] == 'B'):
		if m == 1 and i != k - 3:
			s = s + ' '
			i = i + 3
			m = 0
		else:
			i = i + 3
	else:
		s = s + a[i]
		m = 1
		i = i + 1
print(s)


p = input().replace('WUB', ' ')
p = ' '.join(p.split())
print(p)


def check_wub(check_str):
	if check_str == 'WUB':
		return True
	else:
		return False
input_str = input()
rst_str = ' '
i = 0
while i < len(input_str):
	if input_str[i] == 'W' and check_wub(input_str[i:i + 3]):
		if rst_str[-1] != ' ':
			rst_str += ' '
		i += 2
	else:
		rst_str += input_str[i]
	i += 1
print(rst_str.strip())


str1 = input()
count = 0
list2 = []
str2 = ''
list1 = str1.split('WUB')
for i in list1:
	if i != '':
		list2.append(i)
for i in list2:
	str2 = str2 + i + ' '
print(str2)


remix = input()
i = 0
list = []
while i <= len(remix):
	start = 0
	end = 0
	if remix[i:i + 3] == 'WUB':
		i += 3
	else:
		start = i
		while i <= len(remix):
			if remix[i:i + 3] == 'WUB' or i == len(remix):
				end = i
				list.append(remix[start:end])
				i += 3
				break
			else:
				i += 1
print(' '.join(list))


line = input()
line = line.strip()
line = line.upper()
letter = list(line)
newlin = ''
flag = 0
i = 0
n = len(line)
while i < n:
	if letter[i] == 'W':
		if i < n - 2:
			if letter[i + 1] == 'U' and letter[i + 2] == 'B':
				i = i + 3
				if flag == 1:
					flag = 0
					newlin = newlin + ' '
				continue
			else:
				newlin = newlin + letter[i]
				flag = 1
				i = i + 1
				continue
		else:
			newlin = newlin + letter[i]
			flag = 1
			i = i + 1
			continue
	else:
		newlin = newlin + letter[i]
		flag = 1
		i = i + 1
		continue
newlin = newlin.strip()
print(newlin)


s = input()
s = s.split('WUB')
a = ''
for x in s:
	if x != '':
		a += x + ' '
print(a)


s = input().strip()
tokens = list(filter(None, s.split('WUB')))
res = ''
for token in tokens:
	res += token + ' '
print(res.strip())


s = input()
s = s.split('WUB')
for el in s:
	if len(el) > 0:
		print(el, end=' ')


A = [str(i) for i in input().split('WUB') if i != '']
print(' '.join(A))


x = input()
y = x.split('WUB')
z = len(y)
result = ''
for i in range(z):
	if y[i] != '':
		result = result + y[i] + ' '
p = len(result)
if result[p - 1:] == ' ':
	result = result[:p - 1]
print(result)


s = input()
s = list(map(str, s.split('WUB')))
n = len(s)
t = list()
i = 0
while i < n:
	if s[i] != '':
		t.append(s[i])
	i = i + 1
print(' '.join(t))


s = input() + 'WUB'
i = 0
current_word = ''
all_words = []
while i < len(s):
	w = s[i]
	u = s[i + 1]
	b = s[i + 2]
	if w + u + b == 'WUB':
		if current_word:
			all_words.append(current_word)
		current_word = ''
		i += 3
	else:
		current_word += s[i]
		i += 1
print(*all_words)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	s = S()
	a = s.split('WUB')
	t = ''
	for c in a:
		if c == '':
			continue
		if t != '':
			t += ' '
		t += c
	return t
print(main())


def main():
	song = input().split('WUB')
	words = []
	for word in song:
		if word != '':
			words.append(word)
	words.append('')
	print(' '.join(words))
while True:
	try:
		main()
	except EOFError:
		break


def main():
	s = input()
	s = s.replace('WUB', ' ')
	s = s.strip()
	s = s.split(' ')
	i = 0
	while i < len(s):
		if s[i] == '':
			del s[i]
			i = i - 1
		i = i + 1
	print(' '.join(map(str, s)))
main()


x = input()
a = x.split('WUB')
k = 0
while k < len(a):
	if a[k] == '':
		a.remove(a[k])
		k = k - 1
	k = k + 1
b = []
for i in range(0, len(a)):
	b.append(a[i])
	if i == len(a) - 1:
		break
	b.append(' ')
c = ''
d = c.join(b)
print(d)


s = input()
s = s.replace('WUB', ' ')
s = s.split(' ')
res = ''
for i in s:
	if i:
		res += i + ' '
print(res)


s = str(input())
x = 'WUB'
while x in s:
	a = s.find(x)
	s = s[0:a] + ' ' + s[a + 3:]
b = []
for _ in range(len(s)):
	b.append(s[_])
_ = 0
r = []
r.append(0)
for _ in range(len(b)):
	if b[_] == ' ':
		if r[len(r) - 1] != ' ':
			r.append(b[_])
	else:
		r.append(b[_])
if r[1] == ' ':
	for _ in range(2, len(r)):
		print(r[_], end='')
else:
	for _ in range(1, len(r)):
		print(r[_], end='')


l = input()
while 'WUB' in l:
	l = l.replace('WUB', ' ')
while '  ' in l:
	l = l.replace('  ', ' ')
l = l[1:] if l[0] == ' ' else l
l = l[:-1] if l[-1] == ' ' else l
print(l)


s = input().split('WUB')
u = ''
for i in s:
	if i != '':
		u += i + ' '
print(u)


a = input()
x = a.split('WUB')
for i in range(len(x)):
	if x[i] == '':
		continue
	else:
		print(x[i], end=' ')


n = input()
p = [str(x) for x in n.split('WUB')]
s1 = ''
for i in range(len(p)):
	if p[i] == '':
		continue
	else:
		s1 += p[i] + ' '
print(s1)


print(' '.join([elem for elem in input().split('WUB') if elem is not '']))


s = input()
fx = str.split(s, sep='WUB')
for k in fx:
	if len(k) == 0:
		continue
	else:
		print(k, end=' ')


s = input()
ns = s.replace('WUB', ' ')
ans = []
c = 1
for i in range(len(ns)):
	if ns[i] == ' ' and c == 0:
		ans.append(' ')
		c = 1
	elif ns[i] != ' ':
		ans.append(ns[i])
		c = 0
print(''.join(ans))


stroka = input()
stroka = stroka.replace('WUB', ' ')
stroka = stroka.split()
stroka = ' '.join(stroka)
print(stroka)


n = input()

def non_empty(s):
	return s != ''
n = n.split('WUB')
n = list(filter(non_empty, n))
n = ' '.join(n)
print(n)


s = input()
k = s.replace('WUB', ' ')
p = ''
val = ''
flag = 0
for i in k:
	if i == ' ' and flag == 0:
		continue
	else:
		flag = 1
		p += i
if len(p) == 1 or len(p) == 0:
	print(p)
else:
	for i in range(len(p) - 1):
		if p[i] == ' ' and p[i + 1] == ' ':
			continue
		else:
			val += p[i]
	val += p[i + 1]
	print(val)


import re
st2 = input()
st2 = st2.replace('WUB', ' ')
st2 = st2.strip()
st2 = re.sub(' +', ' ', st2)
print(st2)


import re
print(re.sub('\\ +', ' ', ' '.join(input().split('WUB')).lstrip().rstrip()))


(s, l) = (input(), [])
for e in s.split('WUB'):
	if len(e) != 0:
		l.append(e)
print(*l)


l1 = [i for i in input().split('WUB')]
st = ''
k = []
l = len(l1)
for i in range(0, l, 1):
	if l1[i] != st:
		k.append(l1[i])
for i in k:
	print(i, end=' ')


s = input()
ans = ''
p = 0
for i in range(len(s)):
	if p + 2 < len(s) and s[p] == 'W' and (s[p + 1] == 'U') and (s[p + 2] == 'B'):
		p = p + 3
		ans = ans + ' '
	else:
		ans = ans + s[p]
		p += 1
	if p >= len(s):
		break
aans = ''
p = 1
for i in ans:
	if i != ' ':
		p = 0
		aans = aans + i
	elif p == 0:
		aans = aans + ' '
		p = 1
print(aans)


remix = input().replace('WUB', ' ')
remix2 = remix.split()
print(' '.join(remix2))


n = input().split('WUB')
for i in range(n.count('')):
	n.remove('')
for j in n:
	print(j, end=' ')


s = input()
ans = []
while s:
	if s[:3] == 'WUB':
		s = s[3:]
		ans.append(' ')
	else:
		ans.append(s[0])
		s = s[1:]
print(' '.join(''.join(ans).split()))


import re
st = input('')
sr = st.replace('WUB', ' ').strip()
print(re.sub(' +', ' ', sr))


l = input().split('WUB')
a = ''
for x in l:
	if x != '':
		a = a + x + ' '
a = a[:-1]
print(a)


strin = input()
listin = list(' '.join(strin).split())
strin = strin.replace('WUB', ' ')
listans = list(strin.split())
print(' '.join(listans))


s = input()
res = s.split('WUB')
for t in res:
	if t != '':
		print(t, end=' ')


s = input()
s = s.replace('WUB', ' ')
s = s.split()
for i in range(0, len(s) - 1):
	print(s[i], end=' ')
print(s[len(s) - 1])


n = input()
lengg = len(n)
i = 0
p = 0
while i <= lengg - 1:
	if i + 2 <= lengg - 1 and (n[i] == 'W' and n[i + 1] == 'U' and (n[i + 2] == 'B')):
		if p == 1:
			print(end=' ')
			i += 3
		else:
			i += 3
		p = 0
	else:
		print(n[i], end='')
		i += 1
		p = 1


t = input().split('WUB')
for i in t:
	if i != '':
		print(i, end=' ')


def main():
	s = input()
	l = s.split('WUB')
	i = []
	for k in l:
		if k != '':
			i.append(k)
	print(' '.join(i))
main()


s = input()
s += '///'
length = len(s)
flag = 0
i = 0
copy = ''
while i < length:
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		if flag == 1:
			copy += ' '
			flag = 0
		i += 3
	else:
		if s[i] != '/':
			copy += s[i]
		i += 1
		flag = 1
print(copy.strip())


a = str(input())
b = a.replace('WUB', ' ')
b = b.split()
b = ' '.join(b)
print(b)


str1 = input()
List = str1.split('WUB')
str2 = ''
for word in List:
	if word != '':
		str2 = str2 + word + ' '
print(str2.strip())


k = input()
f = k.split('WUB')
f = [i for i in f if i != '']
print(' '.join(f).strip())


w = input()
n = ''
i = 0
while True:
	if i == len(w):
		break
	if w[i:i + 3] == 'WUB':
		i += 3
		if len(n) >= 1 and n[-1] != ' ':
			n += ' '
	else:
		n += w[i]
		i += 1
print(n.strip())


a = input()
i = 0
flag = 0
while 1:
	if i <= len(a) - 3:
		if a[i] == 'W' and a[i + 1] == 'U' and (a[i + 2] == 'B'):
			a = a[:i] + ' ' + a[i + 3:]
			i = 0
			flag = 1
	elif i == len(a):
		break
	if flag == 0:
		i += 1
	else:
		flag = 0
s = ' '
for i in range(len(a) - 1):
	if a[i] != a[i + 1] and a[i] == ' ' and (s[len(s) - 1] != ' '):
		s += ' '
	elif a[i] != ' ':
		s += a[i]
if a[len(a) - 1] != ' ':
	s += a[len(a) - 1]
if s[0] == ' ':
	s = s[1:]
print(s)


import sys

def debug(*args):
	return 0

def main(status=int(0)):

	def cout(*args):
		for current_elm in args:
			sys.stdout.write('{}'.format(current_elm))
	p_string = input().split('WUB')
	for f_elm in p_string:
		if f_elm != '':
			cout(f_elm, ' ')
main()


n = input()
i = 0
ans = ''
while i < len(n):
	if n[i:i + 3] == 'WUB':
		i += 3
	else:
		while n[i:i + 3] != 'WUB' and i < len(n):
			ans += n[i]
			i += 1
		ans += ' '
print(ans)


str = input()
newStr = str.replace('WUB', ' ').strip()
answer = ''
foundSpace = False
for i in newStr:
	if i != ' ':
		answer += i
		foundSpace = False
	elif i == ' ':
		if foundSpace == False:
			answer += i
			foundSpace = True
print(answer)


import sys
s = input()
n = len(s)
for i in range(n - 1, 0, -1):
	s = s.replace('WUB' * i, ' ')
print(s.strip())


x = input()
s = ''
i = 0
while i < len(x):
	if i < len(x) - 2:
		if x[i] == 'W' and x[i + 1] == 'U' and (x[i + 2] == 'B'):
			if len(s) == 0 or s[-1] == ' ':
				s = s
			else:
				s += ' '
			i += 3
		else:
			s += x[i]
			i += 1
	else:
		s += x[i]
		i += 1
z = 0
for i in range(len(s) - 1, -1, -1):
	if s[i] == ' ':
		z += 1
	else:
		break
print(s[:len(s) - z])


a = input().replace('WUB', ' ').strip()
for i in range(100):
	a = a.replace('  ', ' ')
print(a)


string = input()
New_string = ''
last = -1
flag = False
i = 0
while i < len(string) - 2:
	New_string = string[i] + string[i + 1] + string[i + 2]
	if New_string == 'WUB':
		last = i + 2
		i += 3
		if flag == True:
			print(' ', end='')
			flag = False
	else:
		print(string[i], end='')
		flag = True
		last = i
		i += 1
	New_string = ''
i = last + 1
while i < len(string):
	print(string[i], end='')
	i += 1


n = input()
n_list = list(n.split('WUB'))
for i in n_list:
	if i != '':
		print(i, end=' ')


import re
string = input()
pattern = '(WUB)+'
string = re.sub(pattern, ' ', string)
string = string.strip()
print(string)


n = input()
k = n.replace('WUB', ' ')
a = [i for i in k.split()]
print(' '.join(a))


str = input()
a = []
newStr = ''
a = list(str.replace('WUB', ' '))
for i in range(5):
	a.append(' ')
for i in range(len(a)):
	if a[i] == ' ':
		continue
	elif a[i + 1] == ' ':
		newStr += a[i] + ' '
	else:
		newStr += a[i]
newStr = newStr.strip()
print(newStr)


s = input()
s = s.replace('WUB', ' ')
s = s.split()
print(*s, end=' ')


string = input()
result_string = ''
isSpace = False
length = len(string)
i = 0
while i < length - 3 and string[i] + string[i + 1] + string[i + 2] == 'WUB':
	i += 3
while i < length - 3:
	if string[i] + string[i + 1] + string[i + 2] == 'WUB':
		if not isSpace:
			result_string += ' '
		isSpace = True
		i += 3
	else:
		isSpace = False
		result_string += string[i]
		i += 1
if i >= length - 2:
	result_string += string[i:]
elif not string[i] + string[i + 1] + string[i + 2] == 'WUB':
	result_string += string[i:]
print(result_string)


song = input().split('WUB')
song = [x for x in song if x != '']
s = ' '.join(song)
print(s)


a = list(input())
if len(a) > 3:
	for i in range(len(a) - 2):
		if a[i] == 'W' and a[i + 1] == 'U' and (a[i + 2] == 'B'):
			a[i + 2] = a[i + 1] = ''
			a[i] = ' '
	for j in range(len(a) - 4, -1, -1):
		if a[j] == a[j + 3] == ' ':
			a[j + 3] = ''
	if a[0] == ' ':
		a[0] = ''
	if a[len(a) - 3] == ' ':
		a[len(a) - 3] = ''
	for k in range(len(a)):
		print(a[k], end='')
else:
	for l in range(len(a)):
		print(a[l], end='')


a = str(input())
(w, words) = (str(), [])
for i in a:
	w = str(w) + i
	if w == 'WUB':
		words.append(w)
		w = ''
	elif w[-3:] == 'WUB':
		words.append(w[:-3])
		w = ''
words.append(w)
w = []
for i in words:
	if i != 'WUB':
		w.append(i)
print(*w)


song = input()
song = song.replace('WUB', ' ')
song = song.split(' ')
song = [x for x in song if x != '']
for word in song:
	print(word, end=' ')
print()


s = input()
remix = 'WUB'
out = s.replace(remix, ' ')
z = ''
out = out.strip()
for i in out:
	if i == ' ' and z[-1] == ' ':
		continue
	else:
		z += i
print(z)


li = [print(i, end=' ') for i in input().split('WUB') if i != '']


print(*filter(None, list(input().split('WUB'))))


s = input()
i = 0
flag = 0
while i < len(s) - 2:
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		i += 3
		if flag == 1:
			print(' ', end='')
			flag = 0
	else:
		print(s[i], end='')
		i += 1
		flag = 1
for i in range(i, len(s)):
	print(s[i], end='')


import re
st = input()
st = st.replace('WUB', ' ')
s1 = st.strip()
print(re.sub(' +', ' ', s1))


print(' '.join((el for el in input().split('WUB') if el != '')))


s = input()
datos = s.split('WUB')
for x in datos:
	if x == '':
		continue
	print(x, end=' ')


s = [w for w in input().split('WUB') if len(w)]
print(' '.join(s))


st = input()
str = st.split('WUB')
s = ''
for i in str:
	if i != '':
		s += i + ' '
print(s)


otvet = ''
s = input()
while s != '':
	if s.find('WUB') == 0:
		s = s[3:]
		continue
	else:
		n = s.find('WUB')
		if n == -1:
			otvet += s
			s = ''
			break
		otvet = otvet + s[0:n] + ' '
		s = s[n:]
print(otvet)


s = input()
list_s = s.split('WUB')
for i in list_s:
	if i != '':
		print(i, end=' ')


str = input().split('WUB')
res = []
for i in str:
	if i != '':
		res.append(i)
print(' '.join(res))


text = input()
clean = text.replace('WUB', ' ')
lst = clean.split()
res = ' '.join(lst)
print(res)


s = input().split('WUB')
l1 = []
for item in s:
	if item != '':
		l1.append(item)
print(' '.join(l1))


s = input().split('WUB')
f = False
for p in s:
	if p != '':
		if f:
			print(' ', end='')
		print(p, end='')
		f = True
print()


string = list(map(str, input().split('WUB')))
ln = len(string)
i = 0
result = ''
while i < ln:
	if string[i] == '':
		i = i + 1
	else:
		result = result + string[i] + ' '
		i = i + 1
print(result[:-1])


import sys, math
from collections import deque
s = input()
i = 0
orig = ''
flag = 0
while i < len(s):
	while i + 2 < len(s) and 'WUB' == s[i:i + 3]:
		if flag == 1:
			orig += ' '
		flag = 0
		i += 3
	if i >= len(s):
		break
	flag = 1
	orig += s[i]
	i += 1
print(orig)


from sys import stdin, stdout, stderr
import sys
inints = lambda : [int(x) for x in stdin.readline().split()]
fastwrite = lambda s: stdout.write(str(s) + '\n')
fasterr = lambda s: stderr.write(str(s) + '\n')
irange = lambda x, y: range(x, y + 1)
s = stdin.readline()
i = 0
res = []
t = ''
while True:
	if i >= len(s):
		if t != '':
			res.append(t)
		break
	if i + 2 <= len(s) - 1 and s[i] == 'W' and (s[i + 1] == 'U') and (s[i + 2] == 'B'):
		i += 3
		if t != '':
			res.append(t)
		t = ''
		continue
	t += s[i]
	i += 1
for r in res:
	stdout.write(r + ' ')


word = input()
word2 = ' '.join([x for x in word.split('WUB') if x != '']).strip()
print(word2)


s = input()
temp = ['x'] * 210
i = 0
while i < len(s):
	if s[i:i + 3] == 'WUB':
		temp[i] = 'x'
		temp[i + 1] = 'x'
		temp[i + 2] = 'x'
		i += 3
	else:
		temp[i] = s[i]
		i += 1
while True:
	if temp[0] == 'x':
		del temp[0]
	else:
		break
while True:
	if temp[-1] == 'x':
		del temp[-1]
	else:
		break
res = []
space = False
for letter in temp:
	if letter == 'x' and space == False:
		res.append(' ')
		space = True
	elif letter != 'x':
		res.append(letter)
		space = False
print(''.join(res))


s = input()
S = s.count('WUB')
list = s.split('WUB')
for i in range(len(list) - 1):
	if list[i] == '':
		print(list[i], end='')
	else:
		print(list[i], end=' ')
print(list[len(list) - 1])


s = input().split('WUB')
a = []
for l in s:
	if l:
		a.append(l)
print(*a)


s = input()
i = 0
s1 = 'WUB'
while i != len(s):
	if s[i:i + 3] == s1:
		i += 3
	else:
		n = i
		while s[i:i + 3] != s1 and i < len(s):
			i += 1
		print(s[n:i], end=' ')


s = input()
n = len(s)
x = False
ans = ''
i = 0
while i < n:
	if i < n - 2 and s[i] == 'W' and (s[i + 1] == 'U') and (s[i + 2] == 'B'):
		x = True
		i += 3
	else:
		if x and len(ans) > 0:
			ans += ' '
		x = False
		ans += s[i]
		i += 1
print(ans)


str1 = input()
str1 = str1.replace('WUB', ' ')
str1 = str1.split()
s = ''
c = 0
for i in str1:
	if c != 0:
		s += ' '
	s += i
	c = c + 1
print(s)


import re
s = input()
x = 0
for i in range(len(s)):
	if x + 2 <= len(s) - 1:
		if s[x] == 'W' and s[x + 1] == 'U' and (s[x + 2] == 'B'):
			x += 3
		else:
			break
	else:
		break
y = s.replace('WUB', '', int(x / 3))
f = y.replace('WUB', ' ')
ans = re.sub(' +', ' ', f)
print(ans)


import sys

def main():
	mezcla = ' '.join([x for x in sys.stdin.readline().strip().split('WUB') if x != '']).strip()
	print(mezcla)
main()


s = input()
c = 0
s = s.replace('WUB', ' ')
for i in range(200):
	if '  ' in s:
		s = s.replace('  ', ' ')
		c += 1
	if c == 0:
		break
print(s)


import re
s = input()
l = [k.start() for k in re.finditer('WUB', s)]
ans = []
if len(l) > 0:
	ans.append(s[:l[0]])
	for i in range(len(l) - 1):
		ans.append(s[l[i] + 3:l[i + 1]])
	ans.append(s[l[len(l) - 1] + 3:])
	for i in ans:
		if len(i) != 0:
			print(i, end=' ')
else:
	print(s)


s = input()
while s.find('WUB') != -1:
	i = s.find('WUB')
	s = s[:i] + ' ' + s[i + 3:]
while s[0] == ' ':
	s = s[1:]
while s[len(s) - 1] == ' ':
	s = s[:len(s) - 1]
while s.find('  ') > -1:
	i = s.find('  ')
	s = s[:i] + ' ' + s[i + 2:]
print(s)


import sys
st = sys.stdin.readline()
i = 0
k = []
v = []
c = 0
while st[i] != '\n':
	if ''.join(st[i:i + 3]) == 'WUB':
		i += 3
		if c > 0:
			k.append(''.join(v))
		v = []
		c = 0
	else:
		c += 1
		v.append(st[i])
		i += 1
if c > 0:
	k.append(''.join(v))
print(' '.join(k))


s = input()
word = 'WUB'
p = s.split('WUB')
s = ''
for i in p:
	if len(i) > 0:
		s = s + ' ' + i
print(s[1:])


remix = input().replace('WUB', ' ')
while remix[0] == ' ':
	remix = remix[1:]
while remix[len(remix) - 1] == ' ':
	remix = remix[:len(remix) - 1]
while remix.find('  ') >= 0:
	remix = remix.replace('  ', ' ')
print(remix)


s = input().strip()
dub = 'WUB'
res = s.split(dub)
res_str = ' '.join([i for i in res if i != ''])
print(res_str)


remix = input()
words = remix.split('WUB')
words = [word for word in words if word != '']
original_song = ' '.join(words)
print(original_song)


import sys
inf = float('inf')
(mod, MOD) = (1000000007, 998244353)

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
string = input().split('WUB')
ans = []
for i in string:
	if i != '':
		ans.append(i)
print(' '.join(ans))


s = input()
ans = ''
for i in s.split('WUB'):
	if i != '':
		ans += f'{i} '
print(ans[0:-1])


n = input()
p = n.split('WUB')
while '' in p:
	p.remove('')
for i in p:
	print(i, end=' ')


words = list(input())
i = 0
while i <= len(words) - 3:
	if words[i] == 'W' and words[i + 1] == 'U' and (words[i + 2] == 'B'):
		words[i] = words[i + 1] = words[i + 2] = ' '
	i += 1
i = 0
while i <= len(words) - 2:
	if words[i] == ' ' and words[i + 1] == ' ':
		del words[i]
	else:
		i += 1
if words[0] == ' ':
	del words[0]
print(''.join(words))


str = input()
count = 0
l = len(str)
s = str.replace('WUB', '.')
lst = s.split('.')
c = lst.count('')
for i in range(c):
	lst.remove('')
s3 = ' '.join(lst)
print(s3)


dub_word = input().split('WUB')
initial_word = ''
for element in dub_word:
	if element != '':
		initial_word = initial_word + element + ' '
print(initial_word)


def check(s, i):
	if s[i:i + 3] == 'WUB':
		return 1
	else:
		return 0

def Dubstep(s):
	i = 0
	res = ''
	while i < len(s):
		if check(s, i) == 0 and i + 3 < len(s):
			while check(s, i) != 1 and i < len(s):
				res = res + s[i]
				i = i + 1
			res = res + ' '
		elif i + 3 >= len(s) and check(s, i) == 0:
			res = res + s[i]
			i = i + 1
		else:
			i = i + 3
	return res
s = input()
print(Dubstep(s))


lst = input().split('WUB')
lst = [x for x in lst[:] if x is not '']
for x in lst:
	print(x, end=' ')


s = [a.strip() for a in input().split('WUB') if a != '']
print(' '.join(s).strip())


remix = input()
remix = remix.split('WUB')
original = ''
k = remix.count('')
for i in range(k):
	remix.remove('')
n = len(remix)
for i in range(n - 1):
	original = original + remix[i] + ' '
original = original + remix[n - 1]
print(original)


x = [ss for ss in input().split('WUB') if ss != '']
print(' '.join(x))


a = input()
b = a.split('WUB')
out = ''
for i in b:
	if len(i) > 0:
		out = out + i + ' '
le = len(out)
print(out[0:le - 1])


s = input()
l = len(s)
a = ''
i = 0
c = 1
while i < l:
	if i + 2 < l:
		if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
			i = i + 3
			if c == 0:
				a = a + ' '
			c += 1
		else:
			a = a + s[i]
			i += 1
			c = 0
	else:
		a = a + s[i]
		i += 1
print(a.strip())


s = input().split('WUB')
for el in s:
	if el != '':
		print(el, end=' ')


lyrics = input().split('WUB')
syl = list(filter(lambda x: x != '', lyrics))
print(*syl, end=' ')


n = input()
n = list(n)
space = 1
s = []
i = 0
for _ in range(0, len(n), 1):
	if i == len(n):
		break
	elif i + 2 < len(n) and n[i] == 'W' and (n[i + 1] == 'U') and (n[i + 2] == 'B'):
		i += 3
		if space == 0:
			s.append(' ')
		space = 1
	else:
		s.append(n[i])
		i += 1
		space = 0
ans = ''
for i in range(0, len(s)):
	ans = ans + s[i]
print(ans)


def solve(st):
	wub = 'WUB'
	while True:
		new_string = st.replace(wub * 2, wub)
		if new_string == st:
			break
		st = new_string
	res = new_string.replace(wub, ' ').strip()
	return res

def test():
	assert solve('WUBWUBABCWUB') == 'ABC'
	assert solve('WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB') == 'WE ARE THE CHAMPIONS MY FRIEND'
print(solve(input()))


s = input()
k = s.split('WUB')
k = list(filter(lambda x: x != '', k))
a = ''
for i in k:
	a += i + ' '
print(a[:-1])


n = input()
res = ''
a = []
i = 0
while i < len(n):
	if len(n) - i < 3:
		res = res + n[i]
		i += 1
		if i == len(n):
			a.append(res)
	elif (n[i] == 'W' and n[i + 1] == 'U') and n[i + 2] == 'B':
		if len(res) > 0:
			a.append(res)
		res = ''
		i += 3
	else:
		res = res + n[i]
		i += 1
		if i == len(n):
			a.append(res)
print(*a)


song = input()
song = song.replace('WUB', ' ')
words = song.split(' ')
origsong = ''
for i in words:
	if i:
		origsong = origsong + i + ' '
print(origsong)


from math import *

def main():
	s = input()
	s = s.replace('WUB', ' ')
	s = s.strip()
	while '  ' in s:
		s = s.replace('  ', ' ')
	print(s)
main()


s = input()
a = s.replace('WUB', ' ')
a = a.split()
print(*a)


n = input()
n = n.replace('WUB', ' ')
for i in range(len(n)):
	n = n.replace('  ', ' ')
	n = n.lstrip(' ')
print(n)


s = input()
arr = list(s)
ans = []
for i in range(len(s) - 2):
	if s[i:i + 3] == 'WUB':
		(arr[i], arr[i + 1], arr[i + 2]) = (0, 0, 0)
i = 0
while i < len(arr) - 1:
	if arr[i] == 0:
		ans.append(' ')
		while arr[i] == 0 and i < len(arr) - 1:
			if i < len(arr) - 1:
				i += 1
			else:
				break
	if arr[i] != 0:
		ans.append(arr[i])
		i += 1
if arr[len(arr) - 1] != 0 and arr[len(arr) - 2] != 0:
	ans.append(arr[len(arr) - 1])
if ans[0] == ' ':
	ans.pop(0)
print(''.join(ans))


s = str(input())
while s.find != -1 and s.find('WUB') == 0:
	s = s[3:]
while s.find('WUB') != -1:
	if s.find('WUB') == s.find('WUBWUB'):
		a = s.find('WUBWUB')
		s = s[:a] + s[a + 3:]
	else:
		a = s.find('WUB')
		s = s[:a] + ' ' + s[a + 3:]
print(s)


print(*list(input().replace('WUB', ' ').split()))


s = str(input())
z = 'WUB'
for i in s.split(z):
	if i:
		print(i, end=' ')


it = input()
outs = it.split('WUB')
final = ''
for x in outs:
	if x is not '':
		final = final + x + ' '
print(final)


s = input().split('WUB')
b = 0
for i in range(len(s)):
	if s[i] != '':
		if b:
			print(' ', end='')
		else:
			b = 1
		print(s[i], end='')


a = input()
a = a.replace('WUB', ' ')
res = ' '.join(a.split())
print(str(res))


import sys

def solve():
	s = input().split('WUB')
	ans = []
	for word in s:
		if word:
			ans.append(word)
			ans.append(' ')
	ans.pop()
	print(''.join(ans))
solve()


s = input()
s2 = s.replace('WUB', ' ')
num = 0
num2 = 0
for i in range(len(s2)):
	if s2[i] != ' ':
		num += 1
	else:
		print(s2[num2:num2 + num] + ' ' * (num > 0), end='')
		num2 = i + 1
		num = 0
print(s2[num2:num2 + num])


s = list(input().split('WUB'))
ans = []
for i in s:
	if i != ' ' and i != '':
		ans.append(i)
print(' '.join(ans))


s = list(input().split('WUB'))
for i in s:
	if i is not '':
		print(i, end=' ')


input_str = input()
filtered_list = input_str.split('WUB')
output_str = ''
for x in filtered_list:
	if x == '':
		pass
	else:
		output_str += x + ' '
output_str.strip()
print(output_str)


word = input()
jawab = ''
if word.find('WUB') == -1:
	print(word)
else:
	while word.find('WUB') != -1:
		idx = word.find('WUB')
		while idx == 0:
			word = word[3:]
			idx = word.find('WUB')
		if word.find('WUB') != -1:
			jawab += word[:idx] + ' '
			word = word[idx:]
		else:
			jawab += word
	print(jawab)


s = input()
for i in range(s.count('WUB')):
	pos = s.find('WUB')
	n = ' '
	if s[pos - 1] == ' ':
		n = ''
	s = s[:pos] + n + s[pos + 3:]
if s[0] == ' ':
	s = s[1:]
print(s)


def main():
	line = [word for word in input().strip().split('WUB') if word]
	for word in line:
		print(word, end=' ')
main()


s = input()
l = s.split('WUB')
y = [s for s in l if s != '']
ans = ' '.join(y)
print(ans)


import re
music = input()
clean = music.replace('WUB', ' ').strip()
original = re.sub('\\s+', ' ', clean)
print(original)


s = str(input())
s = list(s.split('WUB'))
s = list(filter(lambda x: x != '', s))
print(' '.join(s))


str = input()
ary = str.split('WUB')
for s in ary:
	if s != 'WUB' and len(s) > 0:
		print(s, end=' ')


import sys
input = sys.stdin.readline
print(' '.join(input().strip().replace('WUB', ' ').split()))


s = input()
while s.count('WUBWUB'):
	s = s.replace('WUBWUB', 'WUB')
s = s.replace('WUB', ' ').strip()
print(s)


lis1 = input().split('WUB')
lis2 = []
for i in lis1:
	if i != '':
		lis2.append(i)
delim = ' '
print(delim.join(lis2))


s = input()
for i in range(s.count('WUB')):
	s = s[:s.find('WUB')] + ' ' + s[s.find('WUB') + 3:]
s = s.split()
ans = s[0]
for i in range(1, len(s)):
	ans += ' ' + s[i]
print(ans)


s = input()
s = s.replace('WUB', ' ')
s = s.strip().split()
print(' '.join((s for s in s)))


remix = input()
og = remix.split('WUB')
ogfinal = []
for i in range(0, len(og)):
	if og[i] != '':
		ogfinal.append(og[i])
output = ' '.join(ogfinal)
print(output)


s = input()
a = []
for i in s:
	a.append(i)
s1 = ''
i = 0
while i < len(s):
	if a[i] == 'W' and s[i:i + 3] == 'WUB':
		s1 = s1 + ' '
		i = i + 3
	else:
		s1 = s1 + a[i]
		i = i + 1
s1 = s1.strip()
print(' '.join(s1.split()))


a = input()
l = list(map(str, a.split('WUB')))
flag = 0
for i in l:
	if i != '':
		print(i, end=' ')


something = input()
b = something.replace('WUB', ' ').split(' ')
new_list = [elem for elem in b if elem.strip()]
print(' '.join(new_list))


x = input()
x = x.replace('WUB', ' ')
l = x.strip().split()
for a in l:
	print(a, end=' ')
print()


n = input()
a = []
for i in range(len(n)):
	a.append(n[i])
for i in range(len(n) - 2):
	if a[i] == 'W' and a[i + 1] == 'U' and (a[i + 2] == 'B'):
		a[i] = '0'
		a[i + 1] = '0'
		a[i + 2] = '0'
for i in range(len(a) - 1):
	if a[i] != '0' and a[i + 1] != '0':
		print(a[i], end='')
	elif a[i] != '0' and a[i + 1] == '0':
		print(a[i], end=' ')
if a[len(a) - 1] != '0':
	print(a[len(a) - 1])


n = input()
i = 0
answer = ''
space = 1
while i < len(n):
	if i + 2 <= len(n) - 1 and n[i] + n[i + 1] + n[i + 2] == 'WUB':
		if space == 0:
			answer += ' '
			space = 1
		i += 3
	else:
		answer += n[i]
		i += 1
		space = 0
print(answer)


def solve():
	song = input()
	res = ''
	i = 0
	prev = True
	while i < len(song):
		if song[i:i + 3] == 'WUB':
			if not prev:
				res = res + ' '
				prev = True
			i += 3
		else:
			res = res + song[i]
			prev = False
			i += 1
	print(res)
	return
solve()


x = input()
(a, s) = ([], '')
a = x.split('WUB')
for i in a:
	if not i == '':
		s += i + ' '
print(s)


t = input()
s = t.split('WUB')
k = list(filter(lambda a: a != '', s))
print(' '.join(k))


str1 = input()
str_original = ''
t = 0
i = 0
while i < len(str1):
	try:
		if str1[i] == 'W' and str1[i + 1] == 'U' and (str1[i + 2] == 'B'):
			i += 2
			if t == 1:
				str_original += ' '
				t = 0
		else:
			str_original += str1[i]
			t = 1
		i = i + 1
	except:
		str_original += str1[i]
		i = i + 1
		continue
print(str_original)


def get():
	return [int(x) for x in input().split()]
print(*(w for w in input().split(sep='WUB') if w))


song = input()
original = song.split('WUB')
tmp = []
for i in original:
	if i == '':
		continue
	else:
		tmp.append(i)
print(' '.join(tmp))


a = [str for str in input().split('WUB')]
b = []
for i in range(len(a)):
	if a[i] != '':
		b.append(a[i])
print(' '.join(b))


s = input()
song = []
i = 0
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i += 3
	else:
		song.append(s[i])
		i += 1
		if s[i:i + 3] == 'WUB':
			song.append(' ')
print(''.join(song))


a = input()
ans = a.split('WUB')
ans = [x for x in ans if len(x.strip())]
print(*ans)


song = input()
i = 0
espacio = False
s = ''
while i < len(song) - 2:
	if song[i:i + 3] == 'WUB':
		i += 3
		espacio = True
	else:
		if len(s) != 0 and espacio:
			s += ' '
		espacio = False
		s += song[i]
		i += 1
if i < len(song) and espacio:
	s += ' '
s += song[i:]
print(s)


a = input()
b = a.split('WUB')
while '' in b:
	b.remove('')
for x in b:
	print(x, end=' ')


s = input()
t = 'WUB'
i = ''
x = ''
for t in s:
	s = s.replace('WUB', ' ')
	continue
for i in s:
	if i != ' ':
		s = s[s.find(i):]
		break
s = s.split(' ')
for i in s:
	if i == '':
		continue
	else:
		x = x + i + ' '
print(x)


item = input()
result = ''
while item:
	if item[:3] != 'WUB':
		if 'WUB' in item:
			position = item.index('WUB')
			result += item[:position] + ' '
			item = item[position:]
		else:
			result += item
			item = ''
	else:
		item = item[3:]
print(result)


ins = input().split('WUB')
c = ins.count('')
while c > 0:
	ins.remove('')
	c -= 1
for w in ins:
	print(w, end=' ')


s = input()
p = s.split('WUB')
ans = ''
for n in p:
	if n != '':
		ans += n + ' '
print(ans[:-1])


song = input()
song = song.replace('WUB', '|')
originalSong = song.split('|')
for i in originalSong:
	if i != '':
		print(i, end=' ')


s = input()
s = s.split('WUB')
while s.count('') > 0:
	s.remove('')
print(' '.join(s))


s = input()
ans = []
ans = s.split('WUB')
for ss in ans:
	if ss != '':
		print(ss, end=' ')


n = input()
n = n.split('WUB')
word = ''
for i in n:
	if i != '':
		word = word + i + ' '
print(word)


string = input()
stringfiltered = filter(bool, string.split('WUB'))
for x in stringfiltered:
	print(x, end=' ')


from sys import stdin, stdout
if not __debug__:
	stdin = open('input.txt', 'r')
tcs = int(stdin.readline()) if not __debug__ else 1
t = 1
while t <= tcs:
	s = stdin.readline().strip().split('WUB')
	for w in s:
		if len(w):
			print(w, end=' ')
	t += 1


x = input().split('WUB')
ans = ''
for item in x:
	if item != '':
		ans = ans + item + ' '
print(ans)


s = input()
ss = s.replace('WUB', '-')
sss = ''
dash_cnt = 0
for x in ss:
	if x != '-':
		dash_cnt = 0
		sss = sss + x
	elif dash_cnt < 1:
		dash_cnt += 1
		sss = sss + ' '
sss = sss.strip(' ')
print(sss)


t = list(filter(lambda x: x != '', input().split('WUB')))
s = ''
for i in range(len(t)):
	if i == len(t) - 1:
		s += t[i]
	else:
		s += t[i]
		s += ' '
print(s)


s = input()
i = 0
c = 0
u = ''
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i = i + 3
	else:
		if c == i - 1:
			u = u + s[i]
			c = i
		elif s[1:4] == 'WUB' and i == 0:
			u = u + s[i]
			c = i
		else:
			u = u + ' ' + s[i]
			c = i
		i = i + 1
if u[0] == ' ':
	for i in range(1, len(u)):
		print(u[i], end='')
else:
	print(u)


text = input()

def getSong(s, actual):
	n = len(s)
	if n > 2 and s[0] == 'W' and (s[1] == 'U') and (s[2] == 'B'):
		if len(actual) > 0 and actual[len(actual) - 1] != ' ':
			return getSong(s[3:], actual + ' ')
		else:
			return getSong(s[3:], actual)
	elif n > 0:
		return getSong(s[1:], actual + s[0])
	else:
		return actual
print(getSong(text, ''))


s = input()
s = s.replace('WUB', ' ')
l = list(s.split(' '))
p = ''
for i in l:
	if i is not '':
		p += i + ' '
print(p)


piesen = input().split('WUB')
print(' '.join([slovo for slovo in piesen if slovo != '']))


mod = 1000000007
ssi = lambda : map(int, input().split())
s = input()
s = s.split('WUB')
for i in s:
	if len(i) > 0:
		print(i, end=' ')


import sys
l = [x for x in sys.stdin.readline().split('WUB') if x != '' and x != '\n']
print(*l)


a = input()
s = ''
ans = 0
if len(a) < 3:
	s = a
	ans = 1
if ans != 1:
	while a[:3] == 'WUB':
		a = a[3:]
	while len(a) != 0:
		while a[:3] != 'WUB' and len(a) > 0:
			s += a[0]
			a = a[1:]
		if len(a) > 2 and a[:3] == 'WUB':
			a = a[3:]
		if s[-1] != ' ':
			s += ' '
if s[-1] == ' ':
	s = s[:len(a) - 1]
print(s)


str = list(input())
answer = ''
for i in range(len(str) - 2):
	if 'W' == str[i] and 'U' == str[i + 1] and ('B' == str[i + 2]):
		str[i] = 0
		str[i + 1] = 0
		str[i + 2] = 0
for i in range(len(str)):
	if str[i] != 0:
		answer += str[i]
	if str[i] == 0 and answer != '' and (answer[len(answer) - 1] != ' '):
		answer += ' '
print(answer)


song = input()
result = ''
i = 0
while i < len(song):
	if i + 2 < len(song) and song[i] == 'W' and (song[i + 1] == 'U') and (song[i + 2] == 'B'):
		if len(result) == 0 or not result[-1].isspace():
			result += ' '
		i += 3
	else:
		result += song[i]
		i += 1
print(result.strip())


n = input().split('WUB')
n[:] = (value for value in n if value != '')
print(' '.join(n))


def cal(s):
	s = s.replace('WUB', ' ')
	l = list(s.split(' '))
	res = ''
	for i in l:
		if i != ' ' and i != '':
			res = res + i + ' '
	return res
s = input()
print(cal(s))


inp = input().upper().split('WUB')
result = []
for i in range(len(inp)):
	if inp[i] != '':
		result.append(inp[i])
print(' '.join(result))


s = input().split('WUB')
for c in s:
	if len(c) != 0:
		print(c, end=' ')


a = input()
a = a.replace('WUB', ' ')
for i in range(10):
	a = a.replace('   ', ' ')
	a = a.replace('  ', ' ')
print(a)


def solution():
	print(' '.join([x for x in input().split('WUB') if x]))
solution()


str = input()
lst = str.split('WUB')
for v in lst:
	if v != '':
		print(v, end=' ')


def main(word):
	s = ''
	x = word.split('WUB')
	for f in x:
		if f == '' or f == ' ':
			pass
		else:
			s += f + ' '
	return s
y = input('')
print(main(y))


l = input()
x = 0
s = ''
while x + 2 <= len(l) + 1:
	if (l[x] == 'W' and (x + 1 < len(l) and l[x + 1] == 'U')) and (x + 2 < len(l) and l[x + 2] == 'B'):
		x += 3
		if x > 0:
			s += ' '
	else:
		s += l[x]
		x += 1
u = s.split(' ')
for v in u:
	if v != '':
		print(v, end=' ')


s = input()
ans = s.replace('WUB', ' ')
l = ans.split(' ')
s = []
for x in l:
	if x == '':
		continue
	else:
		s.append(x)
print(' '.join(s))


s = input()
index = 0
result = []
while index < len(s):
	if s[index:index + 3] == 'WUB':
		index += 3
		if len(result) > 0 and result[-1] != ' ':
			result.append(' ')
		elif len(result) == 0:
			result.append(' ')
	else:
		result.append(s[index])
		index += 1
print(''.join(result).strip())


x = str(input())
n = len(x)
string = x
output = ''
counter = 0
while len(string) > 0:
	if string[:3] == 'WUB':
		string = string[3:]
		if counter == 0:
			output += ' '
			counter = 1
	else:
		output += string[0]
		string = string[1:]
		counter = 0
print(output.strip())


song = input()
song = song.replace('WUB', ' ').strip()
while '  ' in song:
	song = song.replace('  ', ' ')
print(song)


s = list(input().split('WUB'))
x = [x for x in s if x != '']
print(*x)


s = input()
i = 0
ans = ''
moreThanOne = False
while i < len(s):
	if s[i:i + 3] == 'WUB':
		if moreThanOne == False:
			moreThanOne = True
			ans += ' '
		i += 3
	else:
		ans += s[i]
		i += 1
		moreThanOne = False
print(ans.lstrip())


strr = input()
arr = strr.split('WUB')
if len(set(arr)):
	for item in arr:
		if item != '':
			print(item, end=' ')


b = input()
b = b.replace('WUB', ' ')
b = b.split()
print(' '.join(b))


def main():
	song = input()
	words = song.split('WUB')
	for word in words:
		if word != '':
			print(word, end=' ')
main()


a = input().replace('WUB', ' ')
a = a.split()
b = ''
for i in range(len(a)):
	b = b + str(a[i]) + ' '
print(b)


n = input()
count = 0
l = ''
space_required = False
while count < len(n):
	i = n[count]
	if len(n) - count >= 3 and i == 'W' and (n[count + 1] == 'U') and (n[count + 2] == 'B'):
		count += 2
		if l != '':
			space_required = True
	else:
		if space_required:
			l = l + ' '
			space_required = False
		l = l + i
	count += 1
print(l)


s = input()
d = 'WUB'
res = s.split(d)
for i in res:
	if i != '':
		print(''.join(i), end=' ')


s = list(map(str, input().split('WUB')))
x = ''
for i in s:
	if len(i) != 0:
		x += i + ' '
print(x)


orig = input()
orig = orig.replace('WUB', ' ')
orig = ' '.join(orig.split())
print(orig)


string = input()
li = string.split('WUB')
lis = [i for i in li if i != '']
print(' '.join(lis))


def main():
	st = input().split('WUB')
	for i in st:
		if len(i) > 0:
			print(i, end=' ')
	print()
main()


cadena = input()
salida = ''
cadena = cadena.replace('WUB', ' ')
booleano = True
for i in cadena:
	if i == ' ' and booleano and (salida != ''):
		salida += ' '
		booleano = False
	elif i != ' ':
		salida += i
		booleano = True
print(salida)


s = input()
s = s + '&&&'
i = 0
ok = False
while i < len(s):
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		i += 3
		if ok:
			ok = False
			print('', end=' ')
	elif s[i] != '&':
		print(s[i], end='')
		i += 1
		ok = True
	else:
		break


print(' '.join((x for x in input().split('WUB') if len(x))))


def dubstep(s):
	s = s.replace('WUB', '.')
	res = []
	temp = []
	i = 0
	while i < len(s):
		if s[i] == '.':
			fi = ''.join(temp)
			if fi != '':
				res.append(fi)
				res.append(' ')
				temp = []
		else:
			temp.append(s[i])
		i += 1
	if s[-1] != '.':
		fi = ''.join(temp)
		res.append(fi)
	ans = ''.join(res)
	return ans
s = input()
print(dubstep(s))


line = input()
while line[:3] == 'WUB':
	line = line[3:]
while line[-3:] == 'WUB':
	line = line[:-3]
line = line.split('WUB')
line = [x for x in line if x]
print(' '.join(line))


string = input()
s = ''
i = 0
while i < len(string) - 2:
	if string[i] == 'W' and string[i + 1] == 'U' and (string[i + 2] == 'B'):
		i += 3
		s += ' '
	else:
		s += string[i]
		i += 1
if i >= len(string):
	print(' '.join(s.split()))
else:
	s += string[i]
	i += 1
	if i >= len(string):
		print(' '.join(s.split()))
	else:
		s += string[i]
		print(' '.join(s.split()))


dubstep = str(input().strip())
dubstep = dubstep.replace('WUB', ':')
dubstep_list = dubstep.split(':')
output = ' '.join([word for word in dubstep_list if word != ''])
print(output)


n = input()
for i in range(len(n)):
	n = n.replace('WUB', ' ')
l = n.split()
print(' '.join(l))


s = input()
res = s.split('WUB')
res = [i for i in res if i]
print(' '.join(res))


s = input().split('WUB')
i = 0
while i < len(s):
	if s[i] == '':
		s.remove(s[i])
		i -= 1
	i += 1
print(' '.join((i for i in s)))


def main():
	st = input()
	req(st)

def req(st):
	for x in st.split('WUB'):
		if x:
			print(x, end=' ')
	print()
main()


s = input()
n = len(s)
i = 0
r = ''
while i < n:
	if i < n - 2:
		if s[i:i + 3] == 'WUB':
			i += 3
			if r != '':
				print(r, end=' ')
				r = ''
		else:
			r += s[i]
			i += 1
	else:
		r += s[i]
		i += 1
print(r)


s = input().split('WUB')
try:
	while True:
		s.remove('')
except ValueError:
	print(' '.join(s))


line = input().split('WUB')
s = ''
for i in line:
	if i == '':
		continue
	else:
		s += ' ' + i
print(s.strip())


s = input()
a_list = s.split('WUB')
while '' in a_list:
	a_list.remove('')
ans = ' '.join((str(x) for x in a_list))
print(ans)


word = input()
list1 = word.split('WUB')
list2 = []
for item in list1:
	if item != '':
		list2.append(item)
for value in list2:
	print(value, end=' ')


string = input().split(sep='WUB')
while '' in string:
	string.remove('')
for i in string:
	print(i, end=' ')


string = input()
List = string.split('WUB')
for Str in List:
	if Str:
		print(Str, end=' ')


a = str(input())
check = 0
c = []
for i in range(len(a)):
	try:
		if a[i] == 'W' and a[i + 1] == 'U' and (a[i + 2] == 'B') and a[i + 1]:
			check += 1
		elif a[i] == 'U' and a[i + 1] == 'B' and (a[i - 1] == 'W'):
			check += 1
		elif a[i] == 'B' and a[i - 1] == 'U' and (a[i - 2] == 'W'):
			check += 1
		else:
			c.append(a[i])
			check = 0
		if check == 3:
			c.append(' ')
	except:
		c.append(a[i])
print(''.join(c).strip())


s = input()
i = 0
k = []
n = len(s)
count = 0
e = 0
d = 0
while i < n:
	if i + 1 < n and i + 2 < n and (s[i] == 'W') and (s[i + 1] == 'U') and (s[i + 2] == 'B'):
		d = 3
		k.append('a')
	else:
		k.append(s[i])
		d = 1
	i = i + d
for j in range(len(k)):
	if k[j] == 'a':
		count = count + 1
	else:
		if count > 0 and e == 1:
			print(' ', end='')
		count = 0
		e = 1
		print(k[j], end='')


text = input()
l = text.split('WUB')
answer = []
for i in l:
	if i != '':
		answer.append(i)
answer = ' '.join(answer)
print(answer)


n = input()
dub = n.split('WUB')
res_str = ' '.join([r for r in dub if r != ''])
print(res_str)


Palabra = input()
Palabra = Palabra.split('WUB')
s = ''
for h in range(len(Palabra)):
	if Palabra[h] != '':
		s += Palabra[h] + ' '
print(s)


s = input().replace('WUB', ' ')
s_list = [s.strip() for s in s.split(' ')]
s_list = list(filter(None, s_list))
out = ' '.join(s_list)
print(out.strip())


Palabra = input() + 'WUB'
Cancion = ''
k = 0
c = 0
while k < len(Palabra):
	if Palabra[k] == 'W' and Palabra[k + 1] == 'U' and (Palabra[k + 2] == 'B'):
		k += 3
		c += 3
	elif c % 3 == 0:
		Cancion += Palabra[k]
		k += 1
		if Palabra[k] == 'W' and Palabra[k + 1] == 'U' and (Palabra[k + 2] == 'B'):
			Cancion += ' '
print(Cancion)


string = input()
new = string.replace('WUB', ' ')
print(' '.join(new.split()))


from sys import stdin
print(' '.join(filter(None, stdin.readline().strip().split('WUB'))))


inp = str(input())
answer = inp.split('WUB')
for i in range(0, len(answer)):
	if answer[i] == '':
		continue
	print(answer[i], end=' ')


word = list(input().split('WUB'))
list1 = []
for i in word:
	if i != '':
		list1.append(i)
x = ' '.join(list1)
print(x)


n = input()
while 'WUBWUB' in n:
	n = n.replace('WUBWUB', 'WUB')
while 'WUB' in n:
	n = n.replace('WUB', ' ')
n = n.lstrip()
n = n.rstrip()
print(n)


dubstep = input()
dubstep = dubstep.split('WUB')
ans = []
for i in dubstep:
	if i != '':
		ans.append(i)
print(*ans)


a = input()
x = 0
y = 0
l = 0
t = len(a)
r = 0
while x < t:
	if a[x:x + 3] == 'WUB':
		x += 3
		if l != 0:
			if r == 0:
				print(a[y:y + l], end='')
				r = 1
			else:
				print('', a[y:y + l], end='')
			y = 0
			l = 0
	else:
		if y == 0 and x != l:
			y = x
		l += 1
		x += 1
if l != 0 and r == 1:
	print('', a[y:y + l])
if l != 0 and r == 0:
	print(a[y:y + l])


from sys import stdin, stdout
s = stdin.readline().strip().split('WUB')
for x in s:
	if len(x.strip()) > 0:
		stdout.write('{} '.format(x))


dubsong = input()
a = dubsong.replace('WUB', ' ')
print(*a.split())


print(' '.join(filter(bool, input().split('WUB'))))


str = input().split('WUB')
strArr = list(filter(lambda x: x != '', str))
strArr = ' '.join(strArr)
print(strArr)


def go():
	n = input().split('WUB')
	n = [i for i in n if i != '']
	return ' '.join(n)
print(go())


L = input()
L = L.split('WUB')
A = []
for k in range(len(L)):
	if str(L[k]) != '':
		A.append(L[k])
A = ' '.join(A)
print(A)


string = input()
string = string.split('WUB')
res = ''
for i in string:
	if i != '':
		res += i + ' '
print(res)


import sys
from math import *
input = sys.stdin.readline
RI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw = lambda : input().strip().split()
from collections import defaultdict as df
import heapq
infinite = float('inf')
s = input()
ans = ''
i = 0
while i < len(s) - 2:
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		i += 3
	else:
		break
while i < len(s):
	if s[i] == 'W' and i < len(s) - 2:
		if s[i + 1] == 'U' and s[i + 2] == 'B':
			ans += ' '
			i += 3
		else:
			ans += s[i]
			i += 1
	else:
		ans += s[i]
		i += 1
ans = ans.strip().split()
ans = ' '.join(ans)
print(ans)


st = input()
l = st.split('WUB')
l = ' '.join(l).split()
for i in range(0, len(l)):
	print(l[i], end=' ')


import re
t = re.sub('WUB', ' ', input()).split()
r = ' '.join([l for l in t if l != ' '])
print(r)


import re
A = input()
pattern = re.compile('WUB')
L = [i.start() for i in re.finditer(pattern, A)]
if len(L) == 0:
	print(A)
else:
	N = len(L)
	n = len(A)
	if n > L[N - 1] + 3:
		L.append(n)
	if L[0] != 0:
		L.insert(0, -3)
	E = ''
	i = 0
	N = len(L)
	while i <= N - 3:
		if L[i] + 3 == L[i + 1]:
			pass
		else:
			E = E + A[L[i] + 3:L[i + 1]] + ' '
		i += 1
	E = E + A[L[i] + 3:L[i + 1]]
	print(E)


s = input().lower()
ans = s.replace('wub', ' ').upper().strip()
while '  ' in ans:
	ans = ans.replace('  ', ' ')
print(ans)


word = input()
while word[:3] == 'WUB':
	word = word[3:]
while word[-3:] == 'WUB':
	word = word[:-3]
word = word.split('WUB')
x = ''
for ch in word:
	if len(ch) > 0:
		x += ch + ' '
print(x.strip())


s = input()
t = ''
i = 0
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i = i + 3
		continue
	else:
		while s[i:i + 3] != 'WUB' and i < len(s):
			t += s[i]
			i += 1
		t += ' '
print(t)


from sys import stdin

def main():
	line = stdin.readline().strip()
	i = 0
	aux = ''
	arr = []
	while i < len(line):
		if i + 2 < len(line) and line[i] == 'W' and (line[i + 1] == 'U') and (line[i + 2] == 'B'):
			if aux != '':
				arr.append(aux)
				aux = ''
			i += 3
		else:
			aux += line[i]
			i += 1
	if aux != '':
		arr.append(aux)
	for i in range(len(arr) - 1):
		print(arr[i], end=' ')
	print(arr[-1])
main()


a = input().split('WUB')
for i in range(a.count('')):
	a.remove('')
print(*a)


s = input()
i = 0
l = ''
x = []
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i += 3
		if len(l) > 0:
			x.append(l)
		l = ''
	else:
		l += s[i]
		i += 1
x.append(l)
for j in x:
	print(j, end=' ')


s = input()
w = s.count('WUB')
s = s.replace('WUB', ' ', w)
while s.count('  ') > 0:
	s = s.replace('  ', ' ')
if s[0] == ' ':
	s = s[1:]
print(s)


s1 = input().replace('WUB', ' ')
print(' '.join(s1.split()))


strings = input()
strings = strings.replace('WUB', ' ')
strings.strip()
output = ' '.join(strings.split())
print(output)


s = input()
s = s[3:] if s[:3] == 'WUB' else s
s = s[:-3] if s[-3:] == 'WUB' else s
print(' '.join(s.replace('WUB', ' ').split()))


string = str(input()).split('WUB')
a = str()
for i in string:
	if i != '':
		a += i + ' '
print(a)


string = input().split('WUB')
string = list(filter(None, string))
ans = ''
for s in string:
	ans += s + ' '
print(ans)


s = input()
ss = ''
for word in s.split('WUB'):
	if word != '':
		ss += word + ' '
print(ss.rstrip())


song = input()
song = song.replace('WUB', ' ')
ans = ''
l = []
for i in song:
	if i == ' ':
		song = song[1:]
	else:
		break
for j in range(len(song)):
	if song[j] != ' ':
		ans += song[j]
	else:
		l.append(ans)
		ans = ''
l.append(ans)
ans = ''
for x in l:
	if x != '':
		ans = ans + str(x) + ' '
print(ans[:-1])


s = input().replace('WUB', '0')
for i in s.split('0'):
	if i != '':
		print(i, end=' ')


s = input()
s1 = s.split('WUB')
for i in s1:
	if i.isupper():
		print(i, end=' ')


string = input()
n = len(string)
flag = 0
res = ''
i = 0
while i < n:
	if string[i:i + 3] != 'WUB':
		res += string[i]
		i += 1
		flag = 1
	else:
		if flag == 1:
			res += ' '
			flag = 0
		i += 3
print(res)


l = input().strip()
s = ' '
i = 0
while i < len(l):
	if l[i:i + 3] == 'WUB':
		i += 2
		if s[-1] != ' ':
			s += ' '
	else:
		s += l[i]
	i += 1
print(s.lstrip().rstrip())


song = input()
song = song.replace('WUB', ' ')
song.strip()
remix = ' '.join(song.split())
print(remix)


a = input().split('WUB')
new = ''
for i in range(0, len(a)):
	if a[i] == '':
		continue
	else:
		new = new + a[i] + ' '
print(new)


str1 = input().strip()
str2 = 'WUB'
while str1.find(str2) != -1:
	idx = str1.find(str2)
	fStr = str1[:idx]
	eStr = str1[idx + len(str2):]
	str1 = fStr.strip() + ' ' + eStr.strip()
print(str1.strip())


def func(word, starting, ending, znak):
	count_WUB = 0
	if len(word) > 3:
		for i in range(starting, ending, 3 * znak):
			chk = word[i:i + 3]
			if chk == 'WUB':
				count_WUB += 1
			else:
				break
		if znak < 0:
			return word[:len(word) - count_WUB * 3]
		else:
			return word[count_WUB * 3:]
	else:
		return word
word = input()
word = func(word, 0, len(word) - 3, 1)
word = func(word, len(word) - 3, 0, -1)
i = 0
while i <= len(word) - 3:
	if word[i:i + 3] == 'WUB':
		if word[i - 1] == ' ':
			word = word.replace('WUB', '', 1)
		else:
			word = word.replace('WUB', ' ', 1)
			i += 1
	else:
		i += 1
print(word)


s = input()
t = s.replace('WUB', ' ')
a = t.split()
for i in range(len(a) - 1):
	print(a[i], end=' ')
print(a[-1])


a = input()
s = a.replace('WUB', ' ', a.count('WUB'))
print(' '.join(s.split()))


s = input()
res = s.split('WUB')
result = ''
for i in res:
	if i != '':
		result = result + i + ' '
print(result)


a = input().strip()
res = list(a.replace('WUB', ' ').split(' '))
for i in res:
	if i != '':
		print(i, end=' ')


s = input()
flag = s.count('WUB')
i = 0
ans = ''
if flag == 0:
	print(s)
else:
	while i < len(s):
		if s[i:i + 3] == 'WUB':
			i += 3
		else:
			ans += s[i]
			if i != len(s) - 1 and s[i + 1:i + 4] == 'WUB':
				ans += ' '
			i += 1
if len(ans) != 0:
	print(ans)


s = input()
i = 0
p = 'WUB'
n = len(s)
while i < n:
	if s[i:i + 3] == p:
		i += 3
	else:
		q = i
		while s[i:i + 3] != p and i < n:
			i += 1
		print(s[q:i], end=' ')


result = input().replace('WUB', ' ').split()
print(*result)


st = input()
(ans, skip, temp) = ([], 0, '')
for i in range(len(st)):
	if skip:
		skip -= 1
		continue
	if st[i:i + 3] == 'WUB':
		if temp != '':
			ans.append(temp)
		temp = ''
		skip = 2
		continue
	temp += st[i]
for i in ans:
	print(i, end=' ')
if temp != '':
	print(temp)


s = input()
i = 0
ans = ''
while i < len(s):
	h = s.find('WUB', i)
	if h == -1:
		break
	if h == i:
		i = i + 3
	else:
		ans = ans + s[i:h] + ' '
		i = h
if h == -1:
	ans = ans + s[i:] + ''
print(ans)


s = input()
z = ''
i = 0
while i < len(s):
	if s[i:i + 3] == 'WUB':
		z = z + ' '
		i = i + 3
	else:
		z = z + s[i]
		i = i + 1
z = list(z.split())
print(' '.join(z))


s = input()
a = list(s.split('WUB'))
for i in a:
	if i != '':
		print(i, end=' ')


num = input()
num = num.replace('WUB', ' ')
arr = []
count = 0
for i in range(0, len(num)):
	if num[i] == ' ':
		arr.append(num[count:i])
		count = i + 1
	elif i == len(num) - 1:
		arr.append(num[count:len(num)])
result = ''
for i in arr:
	if i != ' ':
		result = result.strip()
		result += ' ' + i
result = result.strip()
print(result)


s = list(input())
n = len(s)
s += ' '
s += ' '
i = 0
kk = False
while i < n:
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		i += 3
		if kk:
			print(' ', end='')
			kk = False
	else:
		print(s[i], end='')
		i += 1
		kk = True


a = input().split('WUB' or 'WUBWUB')
for i in a:
	if i != '':
		print(i, end=' ')
	else:
		pass
print()


remix = input()
song = ' '.join(remix.split('WUB'))
print(' '.join(song.split()))


n = input()
s = n.replace('WUB', ' ')
x = s.split()
s = ''
listToStr = ' '.join([str(elem) for elem in x])
print(listToStr)


s = input()
j = 0
p = []
while j < len(s):
	if s[j:j + 3] == 'WUB':
		j += 3
	else:
		r = ''
		while s[j:j + 3] != 'WUB' and j < len(s):
			r += s[j]
			j += 1
		p.append(r)
print(' '.join(map(str, p)))


remix = str(input())
for i in range(len(remix) - 2):
	if remix[i:i + 3] == 'WUB':
		remix = remix.replace(remix[i:i + 3], ',')
	else:
		remix = remix
remix = remix.strip(',').split(',')
song = ''
for j in remix:
	if j != '':
		song += j + ' '
print(song, end='')


inputs = input()
inputs = inputs.split(sep='WUB')
for i in inputs:
	if i != '':
		print(i, end=' ')


import re
s = input()
res = re.sub('(WUB)+', ' ', s).strip()
print(res)


s = list(input())
for i in range(len(s) - 2):
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		s[i] = '0'
		s[i + 1] = '0'
		s[i + 2] = '0'
for i in range(len(s)):
	if s[i] == '0':
		continue
	if s[i - 1] == '0' and s[i] != '0':
		print(' ', end='')
	print(s[i], end='')
print()


s = input()
a = s.replace('WUB', ' ').strip().replace('  ', ' ')
b = a.count('  ')
if b == 0:
	print(a)
else:
	c = a.replace('  ', ' ')
	print(c)


str = input()
str = str.split('WUB')
str1 = ''
for i in str:
	if i != '':
		str1 = str1 + i + ' '
print(str1)


a = input()
a = a.replace('WUB', ' ')
t = 0
z = len(a) - 1
while a[t] == ' ':
	t = t + 1
while a[z] == ' ':
	z = z - 1
d = a[t:z + 1]
while '  ' in d:
	d = d.replace('  ', ' ')
print(d)


x = input()
a = ''
for i in range(999):
	x = x.split('WUB')
	if 'WUB' not in x:
		break
	for j in x:
		a += j
	x = a
s = [k for k in x if k != '']
for i in s:
	print(i, end=' ')


a = input().split('WUB')
for i in a:
	if i == '':
		continue
	elif i[0] == ' ':
		continue
	else:
		print(i, end=' ')


def fun():
	s = input()
	l = list(s.split('WUB'))
	s = ''
	for i in l:
		if i != '':
			s = s + i + ' '
	print(s[:len(s) - 1])
fun()


x = input().split('WUB')
ans = ''
for i in x:
	if i != '':
		ans += i
		ans += ' '
ans.strip()
print(ans)


import sys
inp = input()
a = inp.replace('WUB', ' ')
temp = ''
flg = 0
for elem in a:
	if ' ' in elem:
		if flg == 1:
			temp = temp + elem
			flg = 0
		else:
			continue
	if ' ' not in elem:
		temp = temp + elem
		flg = 1
print(temp)


s = input()
i = s.find('WUB')
if i != -1 and i != 0:
	print(s[:i], end=' ')
	s = s[i:]
if i == -1:
	print(s)
while s.find('WUB') != -1:
	i = s.find('WUB')
	l = list(s)
	l.pop(i)
	l.pop(i)
	l.pop(i)
	s = ''.join(l)
	j = s.find('WUB')
	if i != j and j != -1:
		print(s[i:j], end=' ')
		s = s[j:]
	if j == -1:
		print(s[i:])


a = input()
b = list(a.split('WUB'))
b = ' '.join((i for i in b if len(i) > 0))
print(b)


def dubstep():
	s = input()
	l = []
	i = 0
	while i < len(s):
		test = ''
		if s[i:i + 3] == 'WUB':
			i = i + 3
		else:
			j = i
			while j < len(s):
				if s[j:j + 3] != 'WUB':
					test = test + s[j]
					j = j + 1
				else:
					break
			i = j
			l.append(test)
	print(' '.join(l))
dubstep()


s = input()
ss = s.replace('WUB', ' ')
sss = ' '.join(ss.split())
print(sss.strip())


n = input()
i = 0
b = []
l = []
while i < len(n):
	if n[i:i + 3] == 'WUB':
		i += 3
		pass
	elif len(n) - i > 2:
		while n[i:i + 3] != 'WUB':
			l.append(n[i])
			i += 1
			if i == len(n):
				break
		b.append(''.join(l))
		l = []
	else:
		if len(n) - i == 1:
			b.append(n[-1:])
		else:
			b.append(n[-2:])
		i = n
		break
print(*b)


song = input()
p = 'WUB'
n = []
s = song.split(p)
for i in range(len(s)):
	if s[i] != '':
		n.append(s[i])
n = ' '.join(n)
print(n)


a = list(input())
for i in range(0, len(a) - 2):
	if a[i] == 'W' and a[i + 1] == 'U' and (a[i + 2] == 'B'):
		a[i] = '\x00'
		a[i + 1] = '\x00'
		a[i + 2] = '\x00'
for i in range(0, len(a)):
	if a[i] != '\x00':
		print(a[i], end='')
		if i != len(a) - 1:
			if a[i + 1] == '\x00':
				print(' ', end='')


a = input()
a = a.replace('WUB', ' ')
a = a.strip()
output = ' '.join(a.split())
print(output)


a = input()
a = a.replace('WUB', ' ')
b = list(a.split())
print(*b, sep=' ')


ipt = input()
ipt = ipt.replace('WUB', ' ')
a = []
s = ''
for i in ipt:
	if i != ' ':
		s += i
	elif s != '':
		a.append(s)
		s = ''
if s != '':
	a.append(s)
	s = ''
print(*a)


a = input()
x = a.replace('WUB', ' ').strip()
for i in range(len(x)):
	if x[i] != ' ':
		print(x[i], end='')
	elif x[i] == ' ' and x[i + 1] != ' ':
		print(' ', end='')


def main():
	inp = input()
	ci = 0
	while ci < len(inp):
		if ci + 3 <= len(inp):
			if inp[ci:ci + 3] == 'WUB':
				inp = inp[:ci] + (' ' if inp[ci - 1] != ' ' else '') + inp[ci + 3:]
			else:
				ci += 1
		else:
			ci += 1
	print(inp.strip())
main()


s = input()
s += 'ee'
a = list(s).copy()
answer = ''
for i in range(len(s)):
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		a[i] = '0'
		a[i + 1] = '0'
		a[i + 2] = '0'
	if s[i + 1] == 'e' and s[i + 2] == 'e':
		a[i + 1] = '0'
		a[i + 2] = '0'
		break
for i in range(len(a)):
	if a[i] != '0':
		answer += a[i]
	if a[i] == '0':
		answer += ' '
print(' '.join(answer.split()))


__author__ = 'runekri3'
song = input()
words = [word for word in song.split('WUB') if len(word) > 0]
print(' '.join(words))


inp = input()
song = inp.split('WUB')
song = [s for s in song if s not in '']
print(' '.join(song))


s = str(input())
x = s.split('WUB')
y = ' '.join((i for i in x if i != ''))
print(y)


a = input() + '00'
b = [0 for col in range(len(a))]
i = 0
j = 0
k = 0
while i <= len(a) - 2:
	if a[i] == 'W' and a[i + 1] == 'U' and (a[i + 2] == 'B'):
		i = i + 3
		if k != 1 and j != 0:
			b[j] = ' '
			k = 1
			j = j + 1
	else:
		k = 0
		b[j] = a[i]
		j = j + 1
		i = i + 1
print(''.join(b[0:j - 1]))


a = input()
i = 0
s1 = ''
result = ''
l = len(a)
while i < l:
	if i <= len(a) - 2 and a[i:i + 3] == 'WUB':
		if s1 != '':
			result += s1 + ' '
		s1 = ''
		i += 3
	else:
		s1 += a[i]
		i += 1
if s1 != '':
	result += s1
print(result)


x = input()
x = x.replace('WUB', ' ').split()
for i in x:
	print(i, end=' ')


string = input()

def search(s, i):
	while i < len(s):
		if s[i] == 'W':
			i += 1
			if s[i] == 'U':
				i += 1
				if s[i] == 'B':
					return i + 1
				else:
					i -= 1
			else:
				i -= 1
		i += 1
	return i

def exact(s, j):
	a = search(s, j)
	b = search(s, a)
	while b - a == 3 and b < len(s):
		a = b
		b = search(s, a)
	return a
p = 'WUB' + string + 'WUB'
begin = exact(p, 0)
ans = ''
while begin < len(p):
	end = search(p, begin)
	ans += p[begin:end - 3]
	ans += ' '
	begin = exact(p, end - 3)
print(ans)


inp = input().split('WUB')
res = ''
for i in inp:
	if i != '':
		res += i + ' '
print(res[:-1])


def main():
	S = input().rstrip().replace('WUB', ' ').split()
	print(*S)
main()


n = input()
dabstep = 'WUB'
n_excess = n.split(dabstep)
result_list = []
for el in n_excess:
	if el:
		result_list.append(el)
result_string = ' '.join(result_list)
print(result_string)


s = input()
s = s.replace('WUB', ' ')
spl = s.split()
s1 = ''
for w in spl:
	s1 = s1 + ' ' + w
print(s1[1:])


solution = list()
dubstep = input()
state = 0
for char in dubstep:
	if state == 0:
		if char == 'W':
			state = 1
		else:
			solution.append(char)
	elif state == 1:
		if char == 'U':
			state = 2
		elif char == 'W':
			solution.append('W')
			state = 1
		else:
			solution.append('W')
			solution.append(char)
			state = 0
	else:
		state = 0
		if char == 'B':
			state = 0
			if solution and solution[-1] != ' ':
				solution.append(' ')
		else:
			solution.append('WU')
			if char == 'W':
				state = 1
			else:
				solution.append(char)
if state == 1:
	solution.append('W')
elif state == 2:
	solution.append('WU')
print(''.join(solution))


l1 = list(input())
for i in range(len(l1) - 2):
	if l1[i] == 'W' and l1[i + 1] == 'U' and (l1[i + 2] == 'B'):
		l1[i] = ''
		l1[i + 1] = ''
		l1[i + 2] = ''
for i in range(len(l1) - 1):
	if l1[i] != '' and l1[i] != ' ' and (l1[i + 1] == ''):
		l1[i + 1] = ' '
print(''.join(l1))