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

Source: codeforces | Difficulty: EASY
Tags: String algorithms


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=' ')


song = input().strip()
check_wub = False
if 'WUB' in song:
	check_wub = True
	song = song.split('WUB')
	result = ''
	song_2 = song
	for i in song:
		result += i
	song = result
ans = ''
if check_wub:
	for i in song_2:
		if i != '':
			ans += i + ' '
	print(ans.strip())
else:
	print(song)


x = input()
y = x.replace('WUB', ' ')
print(y)


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


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


s = input()
ans = s.replace('WUB', ' ')
print(ans)


string = input()
reda = ' '
reda = string.split('WUB')
reda = ' '.join(reda)
print(reda)


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)


import string
import re
s = input()
l = []
i = 0
while i != len(s):
	if s[i:i + 3] == 'WUB':
		i = i + 3
		l.append('1')
	else:
		l.append(s[i])
		i = i + 1
s1 = ''.join(l)
cleaned = s1.strip(string.digits)
new_string = re.sub('[^A-Z]', ' ', cleaned)
print(new_string)


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=' ')


song = input()
song = song.replace('WUB', ' ').lstrip()
print(song)


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))


st = input()
st = st.replace('WUB', ' ')
st = st.strip()
st = st.replace('  ', ' ')
print(st)


import re
print(re.sub('WUB', ' ', input()).strip())


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=' ')


Str = input()
NStr = Str.replace('WUB', ' ')
NStr1 = NStr.title()
NStr2 = NStr1.replace(' ', '')
import re
Str1 = re.sub('([A-Z])', ' \\1', NStr2)
Str2 = Str1[1:].upper()
print(Str2)


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=' ')


n = input().split('WUB')
print(' '.join(n).lstrip().rstrip())


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=' ')


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
b = []
l = input('')
print(l.replace('WUB', ' '))


x = ' '.join(input().split('WUB')).strip()
print(x)


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))


s = input()
x = s.replace('WUB', ' ')
print(x)


s = input()
l = s.split('WUB')
print(*l)


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


x = input()
z = ''
i = 0
while i < len(x):
	if i < 1:
		if x[i:i + 3] == 'WUB':
			i += 3
		else:
			z += x[i]
			i += 1
	elif x[i:i + 3] == 'WUB':
		z += ' '
		i += 3
	else:
		z += x[i]
		i += 1
	pass
print(z)


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


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()
k = s.split('WUB')
k = ' '.join(k)
j = k.strip()
print(j)


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


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


x = input()
x = x.replace('WUB', ' ')
x = x.strip()
print(x)


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


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)


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


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().rstrip()
l = s.split('WUB')
for i in l:
	if i == '':
		l.remove(i)
for i in range(len(l)):
	print(l[i], 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])


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


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


x = input()
x = x.upper()
count = 0
while len(x) > 2:
	if x[0] == 'W' and x[1] == 'U' and (x[2] == 'B'):
		x = x[3:len(x) + 1]
		if count > 0:
			print(' ', end='')
	else:
		print(x[0], end='')
		x = x[1:len(x)]
		count += 1
print(x)


a = str(input())
b = 'WUB'
i = 2
while i < len(a):
	if i * b in a:
		a = a.replace(i * b, 'WUB')
	i += 1
a = a.replace(b, ' ')
if a[0] == ' ':
	a = a[1:]
if a[-1] == ' ':
	a = a[:len(a) - 1]
print(a)


print(input().replace('WUB', ' ').strip())


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)


a = input()
b = a.replace('WUB', ' ').replace('  ', ' ').strip()
print(b)


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))


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


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


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


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=' ')


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


X = input()
X = X.replace('WUB', ' ')
print(X.strip())


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=' ')


s = input()
result = ''
i = 0
while i < len(s):
	if i >= len(s) - 2 or s[i:i + 3] != 'WUB':
		result = result + s[i]
		i += 1
	else:
		result += ' '
		i += 3
print(result.strip())


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)


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


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


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


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().split('WUB')
b = ''
for val in a:
	if len(val) == 0:
		continue
	else:
		b += val + ' '
print(b)


s1 = input()
l = len(s1)
s = []
done = False
space = False
for i in range(0, l):
	s.append(s1[i])
s.append(' ')
s.append(' ')
i = 0
while not done:
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		i = i + 2
		if i != 2 and i != l - 1 and (space == True):
			print('', end=' ')
			space = False
	else:
		space = True
		print(s[i], end='')
	i += 1
	if i == l:
		done = True


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


a = input()
ANSWER = ''
i = 0
while i < len(a):
	if a[i:i + 3] == 'WUB':
		ANSWER += ' '
		i += 3
		continue
	ANSWER += a[i]
	i += 1
print(ANSWER.strip())


s1 = input()
print(' '.join(s1.split('WUB')).strip(' '))


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()))


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


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


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))


d = 'WUB'
word = input()
x = word.replace(d, ' ')
c = ''
if x[0] != ' ':
	print(x)
else:
	c = x[1:]
	print(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(' ', '')])


s = str(input())
print(*s.split('WUB'))


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


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


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


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


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


l = input()
p = l.replace('WUB', ' ')
for i in range(200):
	q = p.replace('  ', ' ')
if q[0] == ' ':
	q = q.replace(' ', '', 1)
print(q)


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))


string = input()
print(string.replace('WUB', ' '))


a = input()
while True:
	if a.find('WUB') == 0:
		a = a.replace('WUB', '', 1)
	elif a.find('WUB') == -1:
		break
	else:
		a = a.replace('WUB', ' ', 1)
print(a)


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())


def get_values():
	string = input().upper()
	key = 'WUB'
	string = string.replace('WUB', ' ')
	print(string.strip())
get_values()


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())


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


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=' ')


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


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(__)


s = input()
l = s.split('WUB')
print(' '.join(l).lstrip())


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


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


val = input()
print(val.replace('WUB', ' '))


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


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)


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


import re
s = input()
s = s.replace('WUB', ' ')
words = re.findall('[A-Z]+', s)
for word in words:
	print(word, end=' ')


s = input()
m = s.split('WUB')
print(*m)


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


l = input()
l = l.replace('WUB', ' ')
print(l.lstrip())


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


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))


song = input()
n = 0
while not n == -1:
	n = song.find('WUB')
	if not n == -1:
		song = song[:n] + ' ' + song[n + 3:]
song = song.strip()
print(song)


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


str = input()
l = list()
l = str.split('WUB')
for i in l:
	if i == '':
		continue
	print(i)


s = str(input())
d = s.replace('WUB', ' ')
print(d)


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()
str1 = string.replace('WUB', ' ')
str1 = str1.strip()
print(str1)


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())


def func(s):
	l = s.split('WUB')
	for ele in l:
		if ele == '':
			l.remove(ele)
	l = ' '.join(l)
	print(l)
s = input()
func(s)


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


s = str(input())
if 'WUB' in s:
	s = s.replace('WUB', ' ')
	print(s)
else:
	print(s)


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


x = input()
s = ' '
l = x.split('WUB')
S = s.join(l)
print(S)


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


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


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)


raw_input = input()
k = raw_input.replace('WUBWUB', ' ').strip(' ')
print(k.replace('WUB', ' ').strip())


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


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


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


import math
s = str(input())
x = s.replace('WUB', ' ')
p = 0
if x[0] == ' ':
	for i in range(0, len(x), 1):
		if x[i] != ' ':
			p = i
			break
	y = x[p:len(x)]
	print(y)
else:
	print(x)


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


from sys import stdin

def main():
	a = stdin.readline().strip()
	print(a.replace('WUB', ' ').strip())
main()


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


def main():
	st = input()
	st = st.replace('WUB', ' ')
	st = st.lstrip().rstrip()
	print(st)
main()


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)


ins = input()
ins = ins.replace('WUB', ' ')
print(ins.strip())


n = input()
n = n.replace('WUB', ' ')
n = n.strip()
print(n)
nlen = len(n)


n = input()
(i, j) = (0, 0)
r = ''
while j < len(n):
	if n[j:j + 3] == 'WUB':
		r += ''
		j += 3
	else:
		break
i = j
while i < len(n):
	if n[i:i + 3] == 'WUB':
		r += ' '
		i += 3
	else:
		r += n[i]
		i += 1
print(r)


def listToString(s):
	str1 = ' '
	return str1.join(s)
j = input()
k = j.split('WUB')
h = listToString(k).strip()
print(h)


for item in input().split('WUB'):
	print(item, end=' ')


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


s = input()
s = s.replace('WUB', ' ')
s = s.split(' ')
while s[0] == '':
	s.pop(0)
while s[-1] == '':
	s.pop()
print(*s)


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()
_n = n.split('WUB')
n_ = ' '.join(_n)
print(n_)


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


ch = input()
ch1 = ''
l = []
l = ch.split('WUB')
ch1 = ' '.join(l)
print(ch1)


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


remix = input().split('WUB')
for i in remix:
	if i == '':
		remix.remove(i)
print(' '.join(remix))


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)


word = input().upper()
print(word.replace('WUB', ' '))


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


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


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


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


a = input()
b = []
i = 0
while i < len(a):
	if a[i] == 'W':
		if i + 1 < len(a) and a[i + 1] == 'U':
			if i + 2 < len(a) and a[i + 2] == 'B':
				b.append(' ')
				i += 3
			else:
				b.append(a[i])
				i += 1
		else:
			b.append(a[i])
			i += 1
	else:
		b.append(a[i])
		i += 1
print(*b, sep='')


a = str(input())
a = a.replace('WUBWUB', ' ')
a = a.replace('WUB', ' ')
a = a.lstrip()
print(a)


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


i = input()
i = i.replace('WUB', ' ')
print(i.strip())


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


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


n = input().split('WUB')
for i in n:
	if i == '':
		n.remove(i)
print(' '.join(n))


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


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


n = input().rstrip()
n = n.split('WUB')
result = str()
for i in n:
	if i == '':
		continue
	result += i + ' '
print(result.rstrip())


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


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


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


s = input()
a = s.split('WUB')
X = ' '.join(a)
print(X.strip())


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)


a = input().split('WUB')
b = []
for i in a:
	if i.isalpha() != False:
		b.append(i)
print(' '.join(map(str, b)))


s = input()
n = len(s)
s = s.replace('WUB', ' ')
for i in range(1, n // 3):
	p = ' ' * i
	s = s.replace(p, ' ')
s = s.strip()
print(s)


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


x = input()
m = x.replace('WUB', ' ')
print(m)


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))


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


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


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


def wub():
	s = input() + 'WUB'
	res = ''
	i = 0
	while i != len(s):
		if s[i:i + 3] == 'WUB':
			i += 3
		else:
			while i < len(s) and s[i:i + 3] != 'WUB':
				res += s[i]
				i += 1
			else:
				if i >= len(s):
					return res
				res += ' '
	return res
print(wub())


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=' ')


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


str = input()
str = str.replace('WUB', ' ')
str = str.lstrip()
str = str.rstrip()
print(str)


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


a = input()
a = list(a)
while len(a) >= 3:
	if a[0] + a[1] + a[2] == 'WUB':
		a = a[3:]
	else:
		break
while len(a) >= 3:
	if a[-3] + a[-2] + a[-1] == 'WUB':
		a = a[:len(a) - 3]
	else:
		break
a = ''.join(a)
a = a.replace('WUB', ' ')
print(a)


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])


a = input()
j = 0
for i in range(len(a)):
	try:
		if 0 == a.index('WUB'):
			a = a[0:a.index('WUB')] + a[a.index('WUB') + 3:]
		else:
			a = a[0:a.index('WUB')] + ' ' + a[a.index('WUB') + 3:]
	except:
		i = 0
print(a)


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)


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


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)


str1 = input()
str2 = str1.replace('WUB', ' ')
print(str2.strip())


import re
s = str(input())
p = re.compile('WUB')
res = p.sub(' ', s)
print(res)


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)


a = str(input())
a = a.replace('WUB', ' ')
print(a)


import sys
import math
string = input()
i = 0
while string[i:i + 3] == 'WUB':
	i += 3
string = string[i:]
i = len(string)
while string[i - 3:i] == 'WUB':
	i -= 3
string = string[:i]
if 'WUB' in string:
	print(string.replace('WUB', ' '))
else:
	print(string)


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)


sss = input()
sss = sss.replace('WUB', ' ')
sss = sss.lstrip()
sss = sss.rstrip()
print(sss)


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)


s = input()
sol = s.replace('WUB', ' ')
print(sol)


name = input()
output = name.split('WUB')
while output[0] == '':
	output.remove('')
print(' '.join(output))


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


l = list(input().split('WUB'))
print(*l[0:])


def mai():
	s = input()
	s = s.replace('WUB', ' ', -1)
	s = s.lstrip()
	print(s)
	return
mai()


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))


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
a = input()
b = a.replace('WUB', ' ')
print(b)


x = input()
if 'WUB' in x:
	x = x.replace('WUB', ' ')
print(x.strip())


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()
res = ''
if 'WUB' in s:
	for i in range(len(s)):
		if s[i:i + 3] == 'WUB':
			res = s.replace(s[i:i + 3], ' ')
	if res[0] == ' ':
		print(res[1:])
	else:
		print(res)
else:
	print(s)


word = input()
print(word.replace('WUB', ' ').lstrip())


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()
L = s.split('WUB')
s1 = ''
for i in L:
	if i != '':
		print(i, ' ', end='')


n = input()
n = n.replace('WUB', ' ')
print(n.strip(' '))


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))


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


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


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


s = input().split('WUB')
u = ''
for i in s:
	print(i, 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)))


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


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


x = input()
if 'WUB' in x:
	print(x.replace('WUB', ' '))
else:
	print(x)


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


remix = input()
real = remix.replace('WUB', ' ')
print(real.lstrip().rstrip())


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=' ')


s = input()
s2 = 'WUB'
step = s.replace(s2, ' ').lstrip()
print(step)


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


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))


a = input()
b = list(a.split('WUB'))
for k in b:
	if k != '':
		print(k)
		print(' ')


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().split('WUB')
print(*s)


t = input()
v = 'WUB'
s = ''
s = t.replace(v, ' ')
s = s.strip(' ')
print(s)


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))


s = input()
while s.find('WUB') >= 0:
	if s.find('WUB') == 0:
		s = s.replace('WUB', '', 1)
	else:
		s = s.replace('WUB', ' ', 1)
s.rstrip()
print(s)


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


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='')


a = input()
a = a.replace('WUB', ' ')
a = a.lstrip()
print(a)


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


string = input()
arr = []
i = 0
s = ''
vcount = 0
count = 0
while i < len(string):
	if i + 2 < len(string):
		if string[i] == 'W' and string[i + 1] == 'U' and (string[i + 2] == 'B'):
			i = i + 3
			if s != '':
				arr.append(s)
			s = ''
			continue
	s += string[i]
	i += 1
	if i == len(string) and s != '':
		arr.append(s)
print(*arr, sep=' ')


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(' ')])


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


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


s = input()
p = s.replace('WUB', ' ')
q = p.strip()
print(q)


string = str(input())
hsl = ' '
i = 0
while i <= len(string) - 1:
	if i > len(string) - 3:
		for j in range(i, len(string)):
			hsl += string[j]
		break
	elif string[i] == 'W' and string[i + 1] == 'U' and (string[i + 2] == 'B'):
		if hsl[len(hsl) - 1] != ' ':
			hsl += ' '
		i += 3
	else:
		hsl += string[i]
		i += 1
print(hsl.strip())


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


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()


str = input()
str = str.replace('WUB', ' ').strip()
print(str)


import re
track = input()
track += 'WUB'
obj = re.search('(WUB)*([A-Z]+)', track)
track = obj.group(2)
found_list = re.findall('([A-Z]+?)(WUB)+', track)
word_list = []
for it in found_list:
	word_list.append(it[0])
print(' '.join(word_list))


from sys import stdin
print(stdin.readline().replace('WUB', ' ').strip())


s = input()
c = 0
l = len(s)
i = 0
d = 0
if l < 3:
	print(s)
else:
	t = 0
	while i < len(s) - 2:
		if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
			c = 1
			i = i + 2
			t = i + 1
		else:
			if c == 1 and d == 1:
				print('', end=' ')
			c = 0
			print(s[i], end='')
			d = 1
		i += 1
	m = max(i, t)
	if c == 1:
		print('', end=' ')
	print(s[m:])


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


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


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


x = input().upper()
if 'WUB' in x:
	y = x.replace('WUB', ' ').strip()
	print(y)
else:
	print(x)


dub = input()
print(dub.replace('WUB', ' '))


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


def Q25(string):
	string = string.replace('WUB', '1')
	for i in string:
		if i == '1':
			string = string.replace(i, '', 1)
		else:
			break
	string = string.replace('1', ' ')
	return string
line = input().strip()
print(Q25(line))


def get_original_string(s):
	dub = 'WUB'
	res = s.split(dub)
	res_str = ' '.join([r for r in res if r != ''])
	return res_str
s = input().strip()
print(get_original_string(s))


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


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


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


str = input()
str = str.replace('WUB', ' ')
print(str)


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi
import heapq

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

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

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

def main():
	try:
		l = list(input())
		n = len(l)
		i = 0
		ans = []
		temp = []
		while i < n:
			if i + 2 < n:
				if l[i] == 'W' and l[i + 1] == 'U' and (l[i + 2] == 'B'):
					if len(temp) > 0:
						ans.append(''.join(temp))
						temp = []
					i += 2
				else:
					temp.append(l[i])
			else:
				temp.append(l[i])
			i += 1
		if len(temp) > 0:
			ans.append(''.join(temp))
		for x in ans:
			print(x, end=' ')
		print()
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(1):
	main()


s = input()
l = s.split('WUB')
for i in range(len(l) - 2):
	if l[i] == 'ARE' and l[i + 2] == 'THE':
		del l[i + 1]
if l[0] == '':
	print(' '.join(l)[1:])
else:
	print(' '.join(l))


import re
s = input()
s = re.sub('WUB', ' ', s)
for i in range(len(s)):
	if s[i] != ' ':
		index = i
		break
print(s[index:])


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


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


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


word = input()
songs = ''
k = 0
while word:
	if word[0:3] == 'WUB':
		word = word[3:]
	else:
		j = 0
		ch = ''
		while word[j:3 + j] != 'WUB':
			ch += word[j]
			j += 1
			if len(word) == j:
				break
		songs += ch + ' '
		word = word[len(ch):]
print(songs.strip())


s = list(input())
for i in range(len(s) - 2):
	if s[i:i + 3] == list('WUB'):
		s[i:i + 3] = [' ']
s = ''.join(s).replace('  ', ' ').strip()
print(s)


st = list(input())
lp = []
i = 0
while i < len(st):
	if i <= len(st) - 3 and st[i] == 'W' and (st[i + 1] == 'U') and (st[i + 2] == 'B'):
		i += 3
		lp.append(' ')
	else:
		lp.append(st[i])
		i += 1
co = 0
for i in lp:
	if i == ' ':
		co += 1
	else:
		break
for _ in range(co):
	lp.remove(' ')
i = 0
co = 0
while i < len(lp) - 1:
	if lp[i] == ' ' and lp[i + 1] == ' ':
		lp[i] = 0
		co += 1
	i += 1
for _ in range(co):
	lp.remove(0)
print(*lp, sep='')


digit = list(input())
original = []
i = 0
while i < len(digit):
	if digit[i] == 'W' and i < len(digit) - 2 and (digit[i + 1] == 'U') and (digit[i + 2] == 'B'):
		if i != 0:
			original.append(' ')
		i += 2
	else:
		original.append(digit[i])
	i += 1
for i in original:
	print(i, end='')


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


N = input().split('WUB')
print(*N)


st = input()
st = st.replace('WUB', ' ')
a = len(st)
while a != len(st.replace('  ', ' ')):
	st = st.replace('  ', ' ')
	a = len(st)
if st[0] == ' ':
	print(st[1:len(st)])
else:
	print(st)


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


word = input()
while word[0:3] == 'WUB':
	word = word[3:]
while word[-3:] == 'WUB':
	word = word[:-3]
l = word.split('WUB')
print(' '.join(l))


dubstep = input()
i = 0
string = ''
while i < len(dubstep):
	if i < len(dubstep) - 2 and dubstep[i] + dubstep[i + 1] + dubstep[i + 2] == 'WUB':
		i += 3
		string += ' '
	else:
		string += dubstep[i]
		i += 1
print(string.strip())


n = input()
ln = len(n)
my_list = []
count = 0
for v in n:
	my_list.append(v)
k = ''.join(my_list)
if ln >= 3:
	for i in range(0, ln):
		c = int(i)
		if my_list[c - 2] == 'W' and my_list[c - 1] == 'U' and (my_list[c] == 'B'):
			k = k.replace('WUB', ' ')
print(k)


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


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=' ')


str = input()
li = str.split('WUB')
print(' '.join(li).strip(' '))


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))


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


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()
r = s.replace('WUB', ' ')
print(r.lstrip())


n = input()
i = 0
c = []
while i < len(n):
	if n[i:i + 3] == 'WUB':
		i = i + 3
		c.append(' ')
		pass
	else:
		c.append(n[i])
		i = i + 1
k = ''.join(c)
k.rstrip()
print(k)


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)


st = str(input())
x = st.split('WUB')
s = ' '.join(x)
print(s.lstrip().rstrip())


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


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


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


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()
b = [0 for i in range(300)]
t = 0
for i in range(len(s) - 2):
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		b[i] = 1
		b[i + 1] = 1
		b[i + 2] = 1
l = 0
while l < len(s):
	x = ''
	while b[l] != 1 and l < len(s):
		x = x + s[l]
		l += 1
	if x != '':
		print(x, end=' ')
	l += 1


def main():
	phrase = input()
	phrases = phrase.split('WUB')
	phrase = ''
	for item in phrases:
		if len(item):
			phrase += ' ' + item
	phrase = phrase.strip()
	print(phrase)
main()


import re
regex = re.compile('(WUB)+', re.IGNORECASE)
print(regex.sub(' ', input()).strip())


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


s = input()
i = 0
b = []
a = ''
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i = i + 3
	else:
		b.append(i)
		a = a + s[i]
		i = i + 1
cc = 0
for j in range(1, len(b)):
	if b[j - 1] + 1 == b[j]:
		continue
	else:
		a = a[:j + cc] + ' ' + a[j + cc:]
		cc = cc + 1
print(a)


a = input()
dub = 'WUB'
a = a.split(dub)
print(' '.join(a))


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


word = input()
word = word.replace('WUB', ' ')
word = word.replace('  ', ' ')
print(word)


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


song = input()
segments = song.split('WUB')
segments_new = list()
for each in segments:
	if each != '':
		segments_new.append(each)
print(' '.join(segments_new))


a = input()
a1 = a.split('WUB')
a1 = ' '.join(a1)
print(a1)


s = input().split('WUB')
for e in s:
	if e == '':
		s.remove(e)
print(' '.join(s))


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


lis = [str(i) for i in input().split('WUB')]
aux = []
for k in range(0, len(lis)):
	if lis[k] != '':
		aux.append(lis[k])
o = ' '.join(aux)
print(o)


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()
s = s.replace('WUB', ' ')
l = s.split()
d = []
for i in l:
	d.append(i.strip())
print(' '.join(d))


k = list(input())
q = []
for i in range(len(k)):
	q.append(i)
for i in range(len(k) - 2):
	if k[i] == 'W' and k[i + 1] == 'U' and (k[i + 2] == 'B'):
		q.remove(i)
		q.remove(i + 1)
		q.remove(i + 2)
r = []
for i in q:
	if (i + 1 in q) == False:
		r.append(i)
for i in r:
	s = i
	o = [k[i]]
	while (s - 1 in q) == True:
		o.insert(0, k[s - 1])
		s = s - 1
	print(''.join(o), end=' ')


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


f = str(input())
arr = []
i = 0
k = ''
while i < len(f):
	if i < len(f) - 2 and f[i] + f[i + 1] + f[i + 2] == 'WUB':
		i += 3
		arr.append(k)
		k = ''
	else:
		k += f[i]
		i += 1
arr.append(k)
for i in range(len(arr)):
	if arr[i] != '':
		print(arr[i], end=' ')


import re
str1 = input().strip()
str2 = str1.replace('WUB', ' ')
print(str2.strip())


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


word = input()
word1 = word.replace('WUB', ' ')
word2 = word1.strip()
print(word2)


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))


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


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()))


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


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))


s1 = input()
s2 = 'WUB'
print(s1.replace(s2, ' '))


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)


str_input = str(input())
str_out = str_input.replace('WUB', ' ')
print(str_out)


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


p = input()
print(p.replace('WUB', ' '))


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 = str(input())
res = s.replace('WUB', ' ')
res = res.replace('  ', ' ')
res = res.replace('   ', ' ')
res = res.replace('    ', ' ')
if res[0] == ' ':
	print(res[1:])
else:
	print(res)


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])


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

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

def instr():
	s = input()
	return list(s[:len(s)])

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

def main():
	s = input().split('WUB')
	res = ''
	for i in s:
		if i != ' ' and i != '':
			res += i + ' '
	print(res)
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))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


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)


l = list(map(str, input().split('WUB')))
print(*l)


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()


a = input()
n = len(a)
b = ''
i = 0
while i < n:
	if i + 2 < n and a[i:i + 3] == 'WUB':
		b = b + ' '
		i = i + 3
	else:
		b = b + a[i]
		i += 1
for i in range(len(b)):
	if b[i] != ' ':
		break
print(b[i:])


S = input()
w = S.replace('WUB', ' ')
a = list(w.split(' '))
s1 = a[0]
for i in range(1, len(a)):
	s1 = s1 + ' ' + a[i]
print(s1)


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())


str = input()
while 'WUB' in str:
	str = str.replace('WUB', ' ')
while str[0] == ' ':
	str = str[1:]
print(str)


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)


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


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))


arr = []
arr = [str(i) for i in input().split('WUB')]
print(*arr)


string = input()
new_string = ''
i = 0
while i < len(string):
	if string[i:i + 3] != 'WUB':
		new_string = new_string + string[i]
		i = i + 1
	else:
		if i > 0:
			new_string = new_string + ' '
		i = i + 3
print(new_string)


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


s = input()
if 'WUB' in s:
	s1 = s.replace('WUB', ' ')
	print(s1.strip())
else:
	print(s)


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=' ')


a = input()
print(*a.split('WUB'))


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)


s = [str(i) for i in input().split('WUB')]
t = ''
for i in range(len(s)):
	if i == len(s) - 1:
		t += s[i]
	else:
		t += s[i] + ' '
print(t)


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))


st = input()
st1 = ''
st2 = ''
if 'WUB' in st:
	st1 = st.replace('WUB', ' ')
	if '  ' in st1:
		st2 = st1.replace('  ', ' ')
		print(st2)
	else:
		print(st1)
else:
	print(st)


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)


l1 = input().split('WUB')
for i in l1:
	if i == '':
		l1.remove(i)
print(' '.join(l1))


from sys import stdin
song = str(stdin.readline()).replace('\n', '').replace('WUB', ' ').replace('  ', ' ').strip()
print(song)


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=' ')


v = input().upper()
v.replace(' ', 'WUB')
v = v.replace('WUB', ' ')
v = v.strip()
print(v)


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))


x = input()
r = 0
w = 3
for i in range(len(x)):
	if x[r:w] == 'WUB':
		x = x.replace(x[r:w], ' ')
	r += 1
	w += 1
x = x.strip()
print(x)


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)


dubstep = input()
words = dubstep.split('WUB')
print(' '.join(words))


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().split('WUB')
a = ' '.join(s).lstrip()
print(a)


s = input()
R = s.split('WUB')
p = ' '.join(R)
print(p)


import re

def program():
	s = str(input())
	p = re.compile('WUB')
	res = p.sub(' ', s)
	print(res)
program()


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])


c = input()
d = c.split('WUB')
d1 = ''
for i in d:
	if i == '':
		pass
	else:
		d1 = d1 + i + ' '
print(d1)


song = input().upper()
while 'WUB' in song:
	x = song.index('WUB')
	song = song[:x] + ' ' + song[x + 3:]
while '  ' in song:
	x = song.index('  ')
	song = song[:x] + song[x + 1:]
print(song)


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


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


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))


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


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


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


import re
music = input()
if len(music) > 6:
	if music[0:6] == 'WUBWUB':
		music = music[6:]
	elif music[0:3] == 'WUBWUB':
		music = music[3:]
elif len(music) > 3:
	if music[0:3] == 'WUB':
		music = music[3:]
music = music.split('WUB')
music = ' '.join(music)
print(music)


n = input()
t = n.split('WUB')
print(*t)


x = input()
t = x.replace('WUB', ' ')
print(t)


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()


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


n = str(input())
if 'WUB' in n:
	n = n.replace('WUB', ' ')
else:
	pass
if n[0] == ' ':
	print(n[1:])
else:
	print(n)


print(' '.join([i for i in input().split('WUB')]).lstrip())


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


def main():
	str1 = str(input())
	str2 = str1.replace('WUB', ' ')
	if str2[0] == ' ' or str2[-1] == ' ':
		out = str2.strip()
	else:
		out = str2.strip()
	print(out)
main()


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


word = input()
new_word = word.replace('WUB', ' ')
if new_word.startswith(' ') == True:
	new_word = new_word[1:]
if new_word.endswith(' ') == True:
	new_word = new_word[:-1]
print(new_word)


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)


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


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])


from sys import stdin, stdout
input = lambda : stdin.readline().strip()
s = input()
s = s.replace('WUB', ' ')
s = s.strip()
print(s)


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))


dubstep = input()
dubstep = dubstep.replace('WUB', ' ')
dubstep = dubstep.replace('  ', ' ')
print(dubstep.strip())


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=' ')


from sys import stdin, stdout
wor = str(stdin.readline().strip())
print(wor.replace('WUB', ' ').replace('  ', ' ').strip())


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)


x = input().lower().split('wub')
print(' '.join(x).upper())


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)


l = list(input().split('WUB'))
print(' '.join((str(i) for i in l)))


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


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


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))


(z, zz) = (input, lambda : list(map(int, z().split())))
zzz = lambda : [int(i) for i in stdin.readline().split()]
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from string import *
from re import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2 or x == 0:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
l = z()
t = 'WUB'
l = l.replace('WUB', ' ', 100)
print(l.strip())


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)


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


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


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:])


str = input()
sub = 'WUB'
s = str.replace(sub, ' ')
print(s)


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()))


word = input()
print(word.replace('WUB', ' ').strip())


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)


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


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=' ')


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


import sys
Ch = input().strip()
L = Ch.split('WUB')
C = ''
for i in L:
	if i != ' ':
		C = C + i + ' '
	else:
		continue
print(C)


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


song = input()
newsong = song.split('WUB')
print(' '.join(newsong).strip())


def main():
	s = input()
	r = s.replace('WUB', ' ')
	print(r.strip())
main()


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()


def locations(string):
	loc = []
	for i in range(len(string)):
		if string[i:i + 3] == 'WUB':
			loc.append(i)
	if len(loc) != 0 and len(string) - loc[-1]:
		loc.append(len(string))
	if len(loc) != 0 and loc[-1] != 0:
		loc.insert(0, -3)
	return loc
string = input()
l = locations(string)
newstr = ''
if len(l) == 0:
	print(string)
else:
	for i in range(len(l) - 1):
		newstr += string[l[i] + 3:l[i + 1]]
		newstr += ' '
	print(newstr[:-1])


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=' ')


def dubStep(song):
	return ' '.join(song.split('WUB')).lstrip()
print(dubStep(input()))


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))


s = list(input())
while True:
	if s[0:3] == ['W', 'U', 'B']:
		del s[0:3]
	else:
		break
while True:
	if s[len(s) - 3:len(s)] == ['W', 'U', 'B']:
		del s[len(s) - 3:len(s)]
	else:
		break
i = 0
while i < len(s):
	if s[i:i + 3] != ['W', 'U', 'B']:
		pass
	elif s[i:i + 3] == ['W', 'U', 'B']:
		s[i:i + 3] = [' ']
	i += 1
r = 0
while r < len(s):
	if s[r] == ' ':
		if s[r + 1] == s[r]:
			del s[r]
	r += 1
t = ''.join(s)
print(t)


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)


a = input()
b = 'WUB'
a = a.replace(b, ' ').replace('  ', ' ')
if a[0] == ' ':
	print(a[1:])
else:
	print(a)


song = input()
newsong = song.replace('WUB', ' ')
print(newsong.strip().replace('  ', ' '))


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


def mCheckInputs(inputList):
	input1 = inputList[0]
	if input1.isalpha() and 1 <= len(input1) <= 200:
		pass
	else:
		exit(1)

def mHandleInputs(inputList):
	x = input()
	inputList.append(x)
	mCheckInputs(inputList)

def mDoWork(inputList, outputList):
	x = inputList.pop()
	x = x if x[0:2] != 'WUB' else x[3:]
	result = x.replace('WUB', ' ')
	result = result.replace('  ', ' ')
	result = result.replace('   ', ' ')
	result = result.replace('    ', ' ')
	result = result.replace('     ', ' ')
	outputList.append(result)

def mFormatResult(outputList):
	print(outputList[0])

def main():
	inputList = []
	mHandleInputs(inputList)
	outputList = []
	mDoWork(inputList, outputList)
	mFormatResult(outputList)
main()


n = input()
D = n.count('WUB')
t = n.replace('WUB', ' ', D)
t.rstrip().lstrip()
e = t.count('  ')
q = t.replace('  ', ' ', e)
print(q)


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)


s = input().split('WUB')
for x in s:
	if x == '':
		s.remove(x)
print(' '.join(s))


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


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


s = ' '.join(input().split('WUB'))
i = 0
while s[i] == ' ':
	i += 1
j = len(s) - 1
while s[j] == ' ':
	j -= 1
print(s[i:j + 1])


s = list(input())
p = ''
i = 0
while i < len(s):
	if s[i] == 'W' and i + 1 < len(s) and (s[i + 1] == 'U') and (i + 2 < len(s)) and (s[i + 2] == 'B'):
		i = i + 3
		if not p.endswith(' ') or p != '':
			p = p + ' '
	else:
		p = p + s[i]
		i = i + 1
print(p)


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)


s = input()
i = 0
t = ''
S = ''
while i < len(s):
	if s[i:i + 3] == 'WUB':
		S = S + t + ' '
		t = ''
		i = i + 3
	else:
		t = t + s[i]
		i = i + 1
S = S + t + ' '
if S[0] == ' ':
	S = S[1:]
print(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)


input_string = input()
output = input_string.replace('WUB', ' ')
print(output.strip(' '))


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


a = str(input(''))
length = len(a)
b = a.replace('WUB', ' ')
result = b.strip(' ')
print(result)


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='')


print(input().replace('WUB', ' ').strip().rstrip())


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


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


import math
n = input()
n = n.replace('WUB', ' ')
print(n.strip())


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=' ')


def WUB_REMOVER(string):
	return ''.join([x + ' ' for x in string.split('WUB')])
print(WUB_REMOVER(input()))


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)


a = input()
w = a.replace('WUB', ' ')
print(w.strip())


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))


s = input()
x = s.replace('WUB', ' ')
arr = x.split(' ')
ans = ''
for i in arr:
	if i.isalpha():
		ans += i + ' '
print(ans)


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


st = input()
st = st.replace('WUB', ' ')
while st[0] == ' ':
	st = st.replace(' ', '', 1)
print(st)


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


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


s = input()
a = s.replace('WUB', ' ')
a = list(a)
l = len(a)
i = 0
while i < l:
	if a[i] != ' ':
		break
	else:
		a.remove(a[i])
a = ''.join(a)
print(a)


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()
xxx = []
i = 0
while i <= len(n) - 1:
	if i + 2 <= len(n) - 1:
		if n[i] == 'W' and n[i + 1] == 'U' and (n[i + 2] == 'B'):
			i += 3
			xxx.append(' ')
		else:
			xxx.append(n[i])
			i += 1
	else:
		xxx.append(n[i])
		i += 1
i = 0
while i < len(xxx) - 1:
	if xxx[i] == ' ':
		xxx.remove(xxx[i])
		i = 0
	else:
		break
print(*xxx, sep='')


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)


s = input()
if len(s) >= 3:
	if s[0] == 'W' and s[1] == 'U' and (s[2] == 'B'):
		s = list(s)
		s[0] = ''
		s[1] = ''
		s[2] = ''
		s = ''.join(s)
s = s.replace('WUB', ' ')
s = s.strip()
print(s)


n = input()
print(*n.split('WUB'))


o = input()
w = list(o)
n = w.__len__()
m = o.count('WUB')
if o[n - 1] == 'W':
	tt = n - 2 * m - 1
elif o[n - 2] == 'W' and o[n - 1] == 'U':
	tt = n - 2 * m - 2
else:
	tt = n - 2 * m
for i in range(tt):
	if w[i] == 'W' and w[i + 1] == 'U' and (w[i + 2] == 'B'):
		w.pop(i + 2)
		w.pop(i + 1)
		w.pop(i)
		w.insert(i, ' ')
w = ''.join(w)
w = w.rstrip()
w = w.lstrip()
print(w)


from re import sub
string = input()
output = sub('WUB', ' ', string)
print(output.strip())


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 != '')))


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


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


a = input()
i = 0
l = []
if a[0:3] == 'WUB':
	a = a[3:len(a)]
while i < len(a):
	if a[i] == 'W':
		if a[i:i + 3] == 'WUB':
			i += 2
			print(' ', end='')
		else:
			print(a[i], end='')
	else:
		print(a[i], end='')
	i += 1


n = input()
n = n.replace('WUB', ' ')
print(n.lstrip())


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


import re
giv_str = input()
sol = re.sub('WUB', ' ', giv_str)
sollist = re.split('\\s*', sol)
a = ' '.join(sollist)
print(a)


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)


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


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()))


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


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)


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


song = input()
temp = song.replace('WUB', ' ')
print(temp)


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)


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


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)))


import re
a = input()
a = a.replace('WUB', ' ', 200)
print(a.strip())


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


text = input()
print(text.replace('WUB', ' ').strip().replace('  ', ' '))


c = input()
c = c.replace('WUB', ' ')
print(c.strip())


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)


ss = input()
ls = ss.split('WUB')
x = ' '.join(ls)
if x[0] == ' ':
	print(x[1:])
else:
	print(x)


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


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


wub = input()
print(wub.replace('WUB', ' '))


s = input()
while 'WUB' in s:
	s = s.replace('WUB', ' ')
x = 0
for i in range(len(s)):
	if s[i] != ' ':
		x = i
		break
print(s[x:])


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()
x = s.replace('WUB', '#')
for i in range(len(x)):
	if x[i] == '#':
		print(' ', end='')
	else:
		print(x[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)


s = [n for n in input()]
l = 0
for n in range(len(s) - 2):
	if s[n:n + 3] == ['W', 'U', 'B']:
		s[n:n + 3] = [0, 1, 0]
for n in s:
	if n != 0 and n != 1:
		print(n, end='')
	elif n == 1:
		print(' ', end='')


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()
removed = song.replace('WUB', ' ').strip()
print(removed)


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 != '']))


print(' '.join(input().split(sep='WUB')).lstrip())


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=' ')


q = input()
while 'WUB' in q:
	w = q.index('WUB')
	if w != len(q) - 3:
		if q[w + 3:w + 5] != 'WUB':
			q = q[:w] + ' ' + q[w + 3:]
		else:
			q = q[:w] + q[w + 3:]
	else:
		q = q[:w]
while q[0] == ' ':
	q = q[1:]
print(q)


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))


s = input()
l = s.split('WUB')
ans = ''
for f in l:
	ans += f + ' '
print(ans.strip())


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)


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


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


n = input()
n1 = n.replace('WUB', '0')
n1 = list(n1)
for i in range(len(n1)):
	if n1[i] != '0':
		n2 = n1[i:]
		break
for i in range(len(n2) - 1, 0, -1):
	if n2[i] != '0':
		n2 = n2[0:i + 1]
		break
for i in range(len(n2)):
	if i < len(n2) - 1:
		if n2[i] == '0' and n2[i + 1] == '0':
			n2[i] = ''
			n2[i + 1] = ' '
		elif n2[i] == '0' and n2[i + 1] != '0':
			n2[i] = ' '
	elif n2[i] == '0':
		n2[i] = ''
res = ''
for i in range(len(n2)):
	res += n2[i]
print(res)


in0 = input()
in0 = in0.replace('WUB', ' ')
if '  ' in in0:
	in0 = in0.replace('  ', ' ')
if in0[0] == ' ' and in0[-1] == ' ':
	in0 = in0[1:len(in0) - 1]
print(in0)


import string

def func():
	st = input()
	st = str(st)
	st = st.replace('WUB', ' ')
	st = st.strip()
	print(st)
func()


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


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())


j = input()
j = j.replace('WUB', ' ')
print(j)


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:])


n = input()
a = n.split('WUB')
b = ' '.join(a)
print(b.lstrip())


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)


import sys
from random import choice, randint
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 MI():
	return map(int, sys.stdin.readline().strip().split())

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

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().strip().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().strip().split()]

def LS():
	return sys.stdin.readline().strip().split()

def I():
	return int(sys.stdin.readline().strip())

def F():
	return float(sys.stdin.readline().strip())

def S():
	return sys.stdin.readline().strip()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))
inp = sys.stdin.readline
out = sys.stdout.write

def main():
	s = S().split('WUB')
	if '' in s:
		s.remove('')
	pf(' '.join(s))
main()


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(' '))


s = input()
while 'WUB' in s:
	if s.index('WUB') == 0:
		s = s[3:]
	elif s.index('WUB') == len(s) - 3:
		s = s[:-3]
	else:
		i = s.index('WUB')
		s = s[:i] + ' ' + s[i + 3:]
print(s)


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())


s = str(input())
k = s.replace('WUB', ' ')
t = k.replace('  ', ' ')
print(t.strip())


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


L = list(input().split('WUB'))
print(' '.join((str(i) for i in L)))


s = input()
L = []
if len(s) > 3:
	for i in range(len(s) - 2):
		if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
			L.append(i)
	if len(L) > 0:
		if 0 not in L:
			print(s[:L[0]], end=' ')
		L.append(len(s))
		for i in range(len(L) - 1):
			print(s[L[i] + 3:L[i + 1]], end=' ')
	else:
		print(s)
else:
	print(s)


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


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


k = input()
t = k.lower()
st = ''
i = 0
while i < len(t):
	if i <= len(t) - 3:
		if t[i] == 'w':
			if t[i:i + 3] == 'wub':
				st += ' '
				i += 3
				continue
	st += t[i]
	i += 1
print(st.upper())


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='')


z = 0
i = 0
p = ''
h = ''
n = input() + 'WUB'
while i < len(n) - 3:
	if n[i] == 'W' and n[i + 1] == 'U' and (n[i + 2] == 'B'):
		i += 3
		if z == 1:
			p = p + ' '
	else:
		h = n[i]
		p = p + h
		h = ''
		z = 1
		i += 1
print(p)


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()))


s = str(input())
n = len(s) // 3
for i in range(n):
	if s.find('WUB') == 0 or s.find('WUB') == len(s) - 4:
		s = s.replace('WUB', '', 1)
s = s.replace('WUB', ' ')
print(s)


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


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


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


string = input()
sub = ''
t = 0
while t < len(string):
	if string[t:t + 3] == 'WUB':
		t += 3
		sub += ' '
	else:
		sub += string[t]
		t += 1
print(sub.lstrip())


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])


s = input()
t = s.split('WUB')
for i in range(len(t)):
	try:
		if t[i] == '':
			t.pop(i)
	except IndexError:
		break
u = ' '.join(t).strip()
print(u)


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)


strs = input()
s = 'WUB'
strs_l = strs.replace('WUB', ' ')
print(strs_l.strip())


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()


s = 'WUB'
s1 = input()
print(s1.replace(s, ' '))


s = input()
a = list(s.split('WUB'))
print(*a)


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))


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


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


b = input()
c = []
str = ''
n = len(b)
for i in b:
	c.append(i)
i = 0
while i <= len(c) - 3:
	if c[i] == 'W' and c[i + 1] == 'U' and (c[i + 2] == 'B'):
		del c[i]
		c.insert(i, ' ')
		del c[i + 1]
		c.insert(i + 1, '')
		del c[i + 2]
		c.insert(i + 2, '')
	i = i + 1
for i in c:
	print(str + i, end='')


print(input().replace('WUB', ' ').lstrip())


import re
x = input()
print(re.sub('WUB|m', ' ', x))


def song_decoder(song):
	song = str(input())
	print(song.replace('WUB', ' '))
song = ''
song_decoder(song)


s = input()
s = s.replace('WUB', ' ')
a = 1
str = ' '
while a <= 200:
	str += ' '
	s = s.replace(str, ' ')
	a += 1
i = 0
while i < len(s):
	if s[i] != ' ':
		break
	i += 1
j = len(s) - 1
while j >= 0:
	if s[j] != ' ':
		break
	j -= 1
print(s[i:j + 1])


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)


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


from sys import stdin
d = stdin.readline().rstrip()
print(d.replace('WUB', ' ').strip())


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


input_str = input()
output = input_str.replace('WUB', ' ')
print(output.strip(' '))


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


s = input()
s = list(s)
for i in range(len(s) - 2):
	if s[i:i + 3] == ['W', 'U', 'B']:
		s[i:i + 3] = [' ']
(i, j) = (0, len(s) - 1)
while s[i] == ' ':
	s[i] = ''
	i = i + 1
while s[j] == ' ':
	s[j] = ''
	j = j - 1
a = ''.join(s)
print(a)


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='')


a = input()
b = a
include_space = False
cnt = a.count('WUB')
for _ in range(cnt):
	i = b.find('WUB')
	if i != 0:
		include_space = True
	if include_space:
		b = b[0:i] + ' ' + b[i + 3:]
	else:
		b = b[0:i] + b[i + 3:]
print(b)


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)


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


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='')


def solve(s):
	s = s.replace('WUB', ' ')
	return s.strip()
s = input()
print(solve(s))


str = input()
nstr = str.replace('WUB', ' ')
nstr = nstr.lstrip(' ')
print(nstr)


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)


import sys
s = sys.stdin.readline().rstrip().split('WUB')
s = ' '.join(s)
s = s.strip()
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)


import re
str = input()
str = str.replace('WUB', ' ')
print(str.strip())


input_string = input().split('WUB')
print(*input_string)


from sys import stdin

def main():
	n = stdin.readline().strip()
	n = n.replace('WUB', ' ')
	n = n.strip()
	a = ''
	i = 0
	while i < len(n):
		if n[i] == ' ' and n[i + 1] == ' ':
			a += n[i]
			i += 2
		else:
			a += n[i]
			i += 1
	print(a)
main()


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)


word = input()
word_1 = word.replace('WUB', ' ')
word_1 = word_1.replace('  ', ' ')
word_1 = word_1.replace('   ', ' ')
word_1 = word_1.replace('    ', ' ')
word_1 = word_1.replace('     ', ' ')
print(word_1)


import re
a = input()
c = re.sub(pattern='WUB', repl=' ', string=a)
print(c)


s = input()
flag = False
s = s.replace('WUB', ' ')
for i in s:
	if i != ' ':
		flag = True
	if flag == True and i != ' ':
		print(i, end='')
	if flag == True and i == ' ':
		print(' ', end='')


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


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


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


import sys
a = input()
b = 'WUB'
d = a.replace(b, ' ')
for i in range(0, len(d)):
	if d[i] != ' ':
		print(d[i:])
		sys.exit()


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()
s = n.split('WUB')
for i in s:
	print(i, end=' ')


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


val = input()
ans = val.replace('WUB', ' ')
if ans[0] == ' ':
	print(ans[1:])
else:
	print(ans)


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)


n = str(input())
p = n.replace('WUB', ' ')
p = p.lstrip()
print(p)


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]))


n = str(input())
s = n.replace('WUB', ' ')
print(s)


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


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


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


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', ''))


a = input().split('WUB')
i = 0
while i <= len(a) - 1:
	if a[i] == '':
		a.remove(a[i])
	i += 1
print(' '.join(a))


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=' ')


phrase = input()
newPhrase = phrase.replace('WUB', ' ')
newPhrase2 = newPhrase.replace('  ', ' ')
newPhrase3 = newPhrase2.replace('   ', ' ')
print(newPhrase3)


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)


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


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


P = input()
Is = P.split('WUB')
ish = ' '.join(Is)
i = ish.strip().replace('  ', ' ')
print(i)


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


string = input()
List = string.split('WUB')
prod = ' '.join(List)
print(prod.strip())


inp = input()
i = inp.replace('WUB', ' ')
l = i.strip()
print(l)


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)


x = input().split('WUB')
i = 0
s = ''
f = False
while i < len(x):
	if x[i] != '':
		f = True
	if f:
		s = s + x[i] + ' '
	i = i + 1
print(s)


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()))


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


str = list(input())
for i in range(len(str) - 2):
	if str[i] == 'W' and str[i + 1] == 'U' and (str[i + 2] == 'B'):
		str[i] = str[i + 1] = '1'
		str[i + 2] = '2'
while '1' in str:
	str.remove('1')
str = ''.join(str)
str = str.replace('2', ' ')
str = str.strip()
print(str)


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)


word = input()
answer = word.replace('WUB', ' ')
print(answer)


def main(string):
	res = ''
	i = 0
	while True:
		if i < len(string) - 2 and string[i] == 'W' and (string[i + 1] == 'U') and (string[i + 2] == 'B'):
			i += 3
		else:
			break
	while i < len(string):
		if i < len(string) - 2 and string[i] == 'W' and (string[i + 1] == 'U') and (string[i + 2] == 'B'):
			res += ' '
			i += 3
		else:
			res += string[i]
			i += 1
	print(res)

def text():
	with open('input.txt', 'r') as f:
		t = int(f.readline().rstrip())
		while t:
			string = str(f.readline().rstrip())
			string = list(string)
			main(string)
			t -= 1

def normal():
	string = str(input())
	string = list(string)
	main(string)
normal()


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))


A = input()
B = A.replace('WUB', '1')
C = B.split('1')
for i in C:
	if len(i) == 0:
		C.remove(i)
	else:
		pass
print(' '.join(C))


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


n = input()
k = 'WUB'
i = 0
l = len(n)
g = n.replace('WUB', ' ')
f = len(g)
count = 0
while i < f:
	if g[i] == ' ':
		count += 1
		i += 1
	else:
		break
b = g[count:f]
print(b)


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=' ')


s = input()
l = s.split('WUB')
for li in l:
	if li == '':
		l.remove('')
print(*l, sep=' ')


def wub(a):
	s = ''
	i = 0
	while i < len(a):
		if i + 3 <= len(a) and a[i + 1] == 'U' and (a[i + 2] == 'B') and (a[i] == 'W'):
			i += 3
			s += ' '
		else:
			s += a[i]
			i += 1
	print(s.strip())
a = input()
wub(a)


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=' ')


s = input()
a = []
final_s = ''
for i in range(len(s)):
	a.append(s[i])
point = False
i = 0
while point == False:
	if i < len(a) - 2:
		if a[i] == 'W' and a[i + 1] == 'U' and (a[i + 2] == 'B'):
			del a[i]
			del a[i]
			a[i] = ' '
		i += 1
	else:
		point = True
for i in range(len(a)):
	final_s += a[i]
print(final_s)


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


n = input()
k = n.replace('WUB', ' ')
print(k)


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


s = input()
clave = 'WUB'
s.count(clave)
sol = s.replace(clave, ' ', s.count(clave))
sol.strip()
print(sol)


(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))


from collections import Counter, defaultdict
s = input()
s = s.replace('WUB', ' ')
print(s.strip())


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)


x = input()
li = list(x.split('WUB'))
for i in li:
	if i == 'WUB':
		li.remove(i)
print(' '.join(li))


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())


song = input()
if len(song) >= 3:
	if song[0] == 'W' and song[1] == 'U' and (song[2] == 'B'):
		song = song[3:]
if len(song) >= 3:
	if song[-1] == 'W' and song[-2] == 'U' and (song[-3] == 'B'):
		song = song[:-3]
new_song = song.replace('WUB', ' ')
new_song = [str(i) for i in new_song.split()]
for i in new_song:
	print(i, ' ', end='')


A = list(input().split('WUB'))
if '' in A or '' in A:
	A.remove('')
str1 = ''
for x in A:
	str1 = str1 + x + ' '
print(str1)


x = input()
y = x.split('WUB')
y = ' '.join(y)
print(y)


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


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)


a = input()
list1 = a.split('WUB')
if '' in list1:
	list1.remove('')
print(' '.join(list1))


str1 = input()
str1 = str1.replace('WUB', ' ')
i = 0
for x in range(0, len(str1)):
	i = x
	if str1[x] != ' ':
		break
r = str1[i:len(str1)]
for x in range(len(r) - 1, 0, -1):
	i = x
	if r[x] != ' ':
		break
r = r[0:i + 1]
print(r)


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)


import math

def test():
	t = str(input())
	t = t.replace('WUB', ' ')
	if t[0] == ' ':
		print(t[1:])
	else:
		print(t)
test()


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()
lst = s.split('WUB')
for str in lst:
	print(str, 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))


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


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)


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


s = input()
ans = ''
apl = s.split('WUB')
for x in apl:
	ans += x
	ans += ' '
print(ans)


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


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


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


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


x = input()
y = []
z = ''
for i in range(len(x)):
	y.append(x[i])
for i in range(len(x) - 2):
	if y[i] == 'W' and y[i + 1] == 'U' and (y[i + 2] == 'B'):
		y[i] = y[i + 1] = y[i + 2] = ' '
for i in range(len(y)):
	z = z + y[i]
print(z)


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


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=' ')


a = input()
x = a.split('WUB')
res = ''
for i in x:
	if i == ' ':
		continue
	res = res + i + ' '
print(res.lstrip())


s = input('')
so = s.replace('WUB', ' ')
i = 0
while so[i] == ' ':
	i += 1
j = i
while j < len(so):
	print(so[j], end='')
	j += 1


n = input()
newn = n.replace('WUB', ' ')
print(newn)


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))


n = input()
m = 'WUB'
n1 = n.replace(m, ' ')
print(n1.strip(' '))


a = input()
if 'WUB' in a:
	s = a.replace('WUB', ' ')
	print(s.strip())
else:
	print(a)


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()))


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


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])


word = input()
word2 = word.split('WUB')
word3 = ''
for i in word2:
	if i == 'WUB':
		continue
	else:
		word3 += i + ' '
print(word3)


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


s = input()
l = s.split('WUB')
st = ' '
op = st.join(l)
print(op)


__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 = 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] = ' '
		s[i + 1] = ''
		s[i + 2] = ''
x = ''.join(s)
print(x.lstrip())


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


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


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


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


def solve(nstring):
	a = nstring.split('WUB')
	b = ' '.join(a)
	return b.strip(' ')
n = input()
print(solve(n))


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))


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


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)


wub_song = input()
wub_song = wub_song.replace('WUB', ' ').strip().replace('  ', ' ')
print(wub_song)


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


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()))


input_s = input()
print(input_s.replace('WUB', ' ').strip())


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 find(s):
	str = ''
	i = 0
	while i < len(s):
		if s[i] == 'W':
			temp = s[i:i + 3]
			if temp == 'WUB':
				if len(str):
					str += ' '
				i = i + 3
			else:
				str += s[i]
				i += 1
		else:
			str += s[i]
			i += 1
	return str
print(find(input()))


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
s = input()
s = s.replace('WUBWUB', ' ').replace('WUB', ' ')
print(s.strip())


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


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))


s = input()
a = 0
while a != -1:
	a = s.find('WUB')
	if a == -1:
		break
	if a > 0:
		s = s[:a] + ' ' + s[a + 3:]
	if a == 0:
		s = s[a + 3:]
print(s)


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


a = input()
b1 = 0
b2 = 1
b3 = 2
while 'WUB' in a:
	if a[b1] == 'W' and a[b2] == 'U' and (a[b3] == 'B'):
		a = a[b1 + 3:]
	else:
		a = a.replace('WUB', ' ', 1)
		b1 = b1 + 1
		b2 = b2 + 1
		b3 = b3 + 1
if a[-1] == ' ':
	a = a[:-1]
print(a)


x = input()
x = x.split('WUB')
j = 0
while x[j] == '':
	j += 1
y = x[j]
i = j + 1
while i < len(x):
	y = y + ' ' + x[i]
	i += 1
print(y)


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'))))


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


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='')


str = input()
s1 = str.replace('WUB', ' ')
print(s1)


s = input()
x = s.split('WUB')
a = ''
for i in x:
	a += i
	a += ' '
print(a.lstrip())


s = input()
s = s.replace('WUB', ' ')
while s[0] == ' ':
	for i in s:
		if i == ' ':
			s = s.replace(i, '', 1)
		else:
			break
s = s[::-1]
while s[0] == ' ':
	for i in s:
		if i == ' ':
			s = s.replace(i, '', 1)
		else:
			break
s = s[::-1]
print(s)


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)


import re

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())

def printX(A, B):
	print('?', A, B, flush=True)

def solve():
	x = getStr()
	x = re.sub('WUB', ' ', x).strip()
	x = re.sub('  ', ' ', x)
	return x
ans = solve()
print(ans)


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


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


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()


st = input()
actual_st = st.replace('WUB', ' ')
print(actual_st)


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


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


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=' ')


mixed_song = input()
original_song = mixed_song.replace('WUB', ' ')
print(original_song.strip())


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])


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


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


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)


n = input()
if 'WUB' in n:
	print(n.replace('WUB', ' '))
else:
	print(n)


t = input().split('WUB')
st = ''
for i in t:
	if i == '':
		t.remove(i)
for i in t:
	st += i + ' '
print(st)


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()
start = 0
while start + 2 < len(s) and s[start:start + 3] == 'WUB':
	start += 3
end = len(s) - 1
while end - 2 >= 0 and s[end - 2:end + 1] == 'WUB':
	end -= 3
print(' '.join(s[start:end + 1].split('WUB')))


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=' ')


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


import re
string = input()
string_L = list(string)
index = [m.start() for m in re.finditer('WUB', string)]
for i in range(len(index)):
	string_L[index[i] - i * 2:index[i] + 3 - i * 2] = ' '
out = ''.join(string_L)
print(out)


kata = input()
kata1 = kata.replace('WUB', ' ')
print(kata1.strip())


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


from sys import stdin
remix = stdin.readline().split('WUB')
print(' '.join(remix))


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


ch = input()
ch = ch.replace('WUB', ' ')
print(ch.strip())


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)


k = input()
k = k.replace('WUB', ' ')
k = k.strip()
print(k)


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)


a = input()
print(a.replace('WUB', ' ', len(a) // 3).lstrip())


a = input()
print(a.replace('WUB', ' ', a.count('WUB')))


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


txt = input()
x = txt.split('WUB')
for i in x:
	print(i)


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)


remix = input()
remix = remix.replace('WUB', ' ')
print(remix)


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()))


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


arr = input()
print(arr.replace('WUB', ' '))


n = list(input().split('WUB'))
for value in n:
	print(value, end=' ')


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))


l = input()
k = l.replace('WUB', ' ')
print(k)


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=' ')


def modifiedString(s, s1):
	s = s.replace(s1, ' ')
	return s.strip()
s = input()
sub = 'WUB'
print(modifiedString(s, sub))


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)


mix = input().replace('WUB', ' ')
print(mix)


text = input()
result = ''
while 'WUB' in text:
	text = text[:text.index('WUB')] + ' ' + text[text.index('WUB') + 3:]
result = text
i = 0
for char in text:
	if len(text) > i + 1 and (char == ' ' and text[i + 1] == ' '):
		result = text[:i] + text[i + 1:]
	i += 1
if result[0] == ' ':
	result = result[1:]
while result[-1] == ' ':
	result = result[:-1]
print(result)


st = list(map(str, input().split('WUB')))
res = ' '.join(st)
print(res)


s = input()
a = 'WUB'
c = s.replace(a, ' ')
print(c)


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=' ')


remix = input()
remix_lyrics = remix.split('WUB')
original = ' '.join(remix_lyrics)
print(original.strip())


s = input()
c = 'WUB'
n = s.count(c)
print(s.replace(c, ' ', n))


n = input()
c = n.split('WUB')
print(*c)


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)


s = input()
if 'WUB' in s:
	s = s.replace('WUB', ' ')
print(s)


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=' ')


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


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


import copy
l1 = input()
l2 = l1.replace('WUB', ' ')
l3 = l2.strip()
print(l3)


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=' ')


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


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)


s = input()
s = s.replace('WUB', ' ')
s = s.strip()
i = 1
while i < len(s) - 1:
	s = s.replace(' ' * i, ' ')
	i += 1
print(s)


a = input().split('WUB')
c_out = ''
for x in a:
	c_out += x + ' '
print(c_out)


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=' ')


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


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))


n = []
x = str(input())
d = x.replace('WUB', ' ')
c = d.replace('  ', ' ')
for v in c:
	n.append(v)
if n[0] == ' ':
	n.remove(n[0])
for m in n:
	print(m, end='')


s = input().split('WUB')
for i in s:
	if i == '':
		s.pop(s.index(i))
print(' '.join(s))


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


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


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 = list(map(str, input().split('WUB')))
for i in s:
	if i == '':
		s.remove(i)
for i in s:
	print(i, end=' ')


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)


a = str(input())
b = 'WUB'
if b in a:
	a = a.replace(b, ' ')
print(a)


inp = input()
print(inp.replace('WUB', ' '))


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='')


def extractSecretMessage(Str, Sub):
	Str = Str.replace(Sub, ' ')
	return Str.strip()
Str = input()
Sub = 'WUB'
print(extractSecretMessage(Str, Sub))


s = input()
s1 = len(s)
i = 0
p = []
while i < s1:
	if s[i:i + 3] == 'WUB':
		i += 3
	else:
		j = int(i)
		while j < s1:
			if s[j + 1:j + 4] != 'WUB':
				j += 1
			else:
				j += 1
				break
		p.append(s[int(i):j])
		i = j
p1 = len(p)
for i in range(p1 - 1):
	print(p[i], ' ', end='')
print(p[-1])


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=' ')


pattrn = 'WUB'
inp = input()
core = inp.split(pattrn)
for part in core:
	print(part, 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=' ')


s1 = input().replace('WUB', ' ')
print(s1)


s = input()
s = str(s)
S = s.replace('WUB', ' ')
c = 0
for i in range(len(S)):
	if S[i] != ' ':
		c = i
		break
print(S[c:len(S)])


x = input().split('WUB')
if 'WUB' in x:
	x.remove('wub')
r = ' '.join(x)
print(r.strip())


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=' ')


u = input()
print(u.replace('WUB', ' '))


a = str(input())
if len(a) < 3:
	print(a)
else:
	i = 0
	b = ''
	while i < len(a) - 3:
		if a[i] == 'W' and a[i + 1] == 'U' and (a[i + 2] == 'B'):
			i = i + 3
			b = b + ' '
		else:
			b = b + a[i]
			i = i + 1
	c = ''
	s = 0
	if a[len(a) - 1] == 'B' and a[len(a) - 2] == 'U' and (a[len(a) - 3] == 'W'):
		s = 0
	else:
		j = len(a) - 1
		i = 3
		while i != 0:
			if a[j] == 'B' and a[j - 1] == 'U' and (a[j - 2] == 'W'):
				i = 0
			else:
				c = c + a[j]
				j = j - 1
				i = i - 1
	c = list(c)
	c.reverse()
	c = ''.join(c)
	b = b + c
	print(b)


s = input().upper()
print(s.replace('WUB', ' '))


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


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


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=' ')


a = input()
splitted = a.split('WUB')
joined = ' '.join(splitted)
final_answer = joined.strip()
print(final_answer)


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


fgh = input()
dfg = 'WUB'
fgh = fgh.replace(dfg, ' ')
fgh = fgh.replace('  ', ' ')
print(fgh.strip())


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


s = str(input())
s2 = s.replace('WUB', ' ')
print(s2)


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()
n = len(s)
s1 = 'WUB'
s2 = s.replace(s1, ' ')
s3 = s2.strip()
print(s3)


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())


str1 = input()
str1 = str1.replace('WUB', ' ')
str1 = str1.lstrip()
print(str1)


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)


print(*list(input().split('WUB')))


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)


from math import *
l = input().split('WUB')
print(*l)


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


s = input()
main = ''
aux = ''
i = 0
while i < len(s) - 2:
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		main += ' '
		i += 3
	else:
		main += s[i]
		i += 1
try:
	main += s[i]
except:
	pass
try:
	main += s[i + 1]
except:
	pass
print(main.strip())


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


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


s = input()
x = s.split('WUB')
while x[0] == '':
	del x[0]
while x[len(x) - 1] == '':
	del x[len(x) - 1]
y = x[0]
for i in range(1, len(x)):
	y += ' ' + x[i]
print(y)


def stripwub(s):
	if s.startswith('WUB'):
		return stripwub(s[3:])
	if s.endswith('WUB'):
		return stripwub(s[0:-3])
	else:
		return s
print(stripwub(input()).replace('WUB', ' '))


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))


n = input()
a = n.split('WUB')
a = ' '.join(a)
print(a.strip())


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


lyric = input()
lyric = lyric.replace('WUB', ' ')
lyric = lyric.strip()
print(lyric)


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))


import re

def main():
	string = input()
	string = string.replace('WUB', 'WUB ')
	lst = re.findall('(\\w+)WUB', string)
	list2 = re.findall('(\\w+)$', string)
	lst = lst + list2
	print(' '.join(lst))
main()


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=' ')


import re
song = input()
updated = re.sub('WUB', ' ', song)
updated = updated.strip()
print(updated)


print(input().replace('WUBWUB', 'WUB').replace('WUB', ' ').strip())


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)


word = input()
check = False
for x in range(len(word)):
	y = x + 3
	if word[x:y] == 'WUB':
		word = word[:x] + ' ' + word[y:]
x = word[0]
while x == ' ':
	word = word[1:]
	x = word[0]
print(word)


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()
w = ''
count = 0
i = 0
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i = i + 3
		w = w + ' '
	else:
		w = w + s[i]
		i = i + 1
print(w)


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])


x = input()
l = len(x)
p = 0
i = 0
while i < l:
	if i < l - 2 and x[i:i + 3] == 'WUB':
		i = i + 3
		if p != 0 and i != l:
			print(' ', sep='', end='')
	else:
		print(x[i], sep='', end='')
		i = i + 1
		p = 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)


s = input()
l = s.split('WUB')
s1 = ''
for e in l:
	s1 = s1 + e + ' '
print(s1)


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


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


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


s = input()
while True:
	if ''.join(s[0:3]) == 'WUB':
		s = s[3:]
	elif ''.join(s[-3:]) == 'WUB':
		s = s[:-3]
	else:
		break
i = 0
op = []
while i < len(s):
	if ''.join(s[i:i + 3]) == 'WUB':
		op.append(' ')
		i += 3
	else:
		op.append(s[i])
		i += 1
print(''.join(op))


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:])


_1 = '236a'
_2 = '339a'
_3 = '266a'
_4 = '96a'
_5 = '236a'
_6 = '281a'
_7 = '546a'
_8 = '116a'
_9 = '977a'
_10 = '266b'
_11 = '110a'
_12 = '41a'
_13 = '734a'
_14 = '133a'
_15 = '467a'
_16 = '158a'
_17 = '677a'
_18 = '580a'
_19 = '344a'
_20 = '1030a'
_21 = '705a'
_22 = '318a'
_23 = '479a'
_24 = '486a'
_25 = '61a'
_26 = '405a'
_27 = '200b'
_28 = '337a'
l = list(map(str, input().split('WUB')))
for i in l:
	if i == '':
		l.remove(i)
print(' '.join(l))


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 re
regex = re.compile('WUB')
a = input()
b = regex.sub(' ', a)
print(b)


import sys
dubstep = input()
dubstep = dubstep.split('WUB')
output = ''
for i in dubstep:
	if len(i) >= 1:
		output += i
		output += ' '
print(output)


song_new = input().replace('WUB', ' ')
print(song_new)


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))


class Dubstep:

	def __init__(self, song):
		song = song.replace('WUB', ' ')
		print(song)
song = str(input())
d = Dubstep(song)


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)


from sys import stdin, stdout
from math import ceil
from collections import deque
inp = stdin.readline
out = stdout.write
s = inp().strip()
c = s.replace('WUB', ' ').strip()
out(c)


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


palabra = input()
pre = palabra.replace('WUB', ' ')
print(pre)


n = input()
l = []
for i in n:
	l.append(i)
i = 0
while i + 2 <= len(l) - 1:
	if l[i] == 'W' and l[i + 1] == 'U' and (l[i + 2] == 'B'):
		del l[i:i + 3]
		l.insert(i, ' ')
		i += 0
	else:
		i += 1
print(''.join(l).strip())


y = input()
x = y.split('WUB')
for i in x:
	if i == '':
		x.remove(i)
print(' '.join(x))


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


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().rstrip()
result = ''
i = 0
g = 0
while i < len(s) - 2:
	if s[i] == 'W' and s[i + 1] == 'U' and (s[i + 2] == 'B'):
		i = i + 2
		result += ' '
	else:
		result += s[i]
	i += 1
try:
	result += s[i]
except:
	pass
try:
	result += s[i + 1]
except:
	pass
print(result)


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))


string = input()
print(string.replace('WUB', ' ', -1).strip())


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


__author__ = 'JohnHook'
print(input().replace('WUB', ' ').strip())


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 re
lyric = input()
new = re.sub('WUB', ' ', lyric)
print(new.lstrip(' '))


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))


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


(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='')


input_str = str(input())
out_str = input_str.replace('WUB', ' ')
print(out_str.strip())


n = input()
new_set = n.replace('WUB', ' ')
print(new_set)


x = str(input())
a = []
z = 0
for i in range(len(x)):
	if z + 2 < len(x) and x[z] == 'W' and (x[z + 1] == 'U') and (x[z + 2] == 'B'):
		a.append(' ')
		z += 3
	else:
		if z < len(x):
			a.append(x[z])
		z += 1
print(''.join(a))


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=' ')


s = input('')
list1 = []
m = s.replace('WUB', '!')
l = m.replace('!!', '!')
for i in l:
	list1.append(i)
if list1[0] == '!':
	print(l[1:].replace('!', ' '))
else:
	print(l.replace('!', ' '))


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


l = str(input())
ln = l.replace('WUB', ' ')
print(ln)


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)


import re
a = input()
a = a.replace('WUB', ' ')
a = re.findall('\\w+\\s', a + ' ')
print(''.join(a))


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


w = input()
w = w.replace('WUB', ' ')
while w[0] == ' ':
	w = w[1:]
print(w)


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())


s = input()
p = s.split('WUB')
print(*p)


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))


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


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


m = input()
m1 = m.replace('WUB', ' ')
m1 = m1.strip()
m2 = m1.replace('  ', ' ')
print(m2)


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])


n = input()
b = n.replace('WUB', ' ')
b = b.replace('  ', ' ')
if b[0] == ' ':
	b = b[1:]
	print(b)
else:
	print(b)


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


i = input()
i = i.replace('WUB', ' ')
print(i)


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)


def remove_all(sub, s):
	return s.replace(sub, ' ')
a = input()
b = 'WUB'
print(remove_all(b, a))


text = input()
for i in range(len(text)):
	text = text.replace('WUB', ' ')
text = text.lstrip()
print(text)


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)


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


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)


s = list(input())
while s:
	if s[:3] == ['W', 'U', 'B']:
		s.pop(0)
		s.pop(0)
		s.pop(0)
		print('', sep=' ', end=' ')
	else:
		print(s[0], sep='', end='')
		s.pop(0)


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(' '))


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


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)


s = input()
s = s.replace('WUB', ' ')
c = 0
for i in range(len(s)):
	if s[i] == ' ':
		c += 1
	elif ord(s[i]) > 32:
		break
print(s[c:])


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)


s = input().split('WUB')
if s[0] == '':
	s.pop(0)
if s[-1] == '':
	s.pop(-1)
print(' '.join(s))


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()))


s = input()
n = len(s)
j = 0
a = s.replace('WUB', ' ')
print(a)


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()
s = s.replace('WUB', ' ').strip()
ans = ''
for i in range(len(s) - 1):
	if s[i] == ' ' and s[i + 1] != ' ':
		ans += s[i]
	elif s[i].isalpha():
		ans += s[i]
if s[-1] != ' ':
	ans += s[-1]
print(ans)


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))


lst = input().split('WUB')
print(' '.join(lst).strip())


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


s = input()
t = s.replace('WUB', ' ')
for i in range(0, len(t)):
	if t[i] != ' ':
		c = i
		break
for i in range(c, len(t)):
	print(t[i], end='')


strng = input().upper()
upd = strng.replace('WUB', ' ')
print(upd.strip())


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]))


n = list(input().split('WUB'))
print(' '.join(n))


a = input()
a = a.replace('WUB', ' ')
while a[0] == ' ':
	a = a.replace(' ', '', 1)
print(a)


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)


string = input()
i = ans = 0
lst = list()
while i < len(string):
	string_replace = string.replace('WUB', ' ')
	i += 1
while ans < len(string_replace):
	x = string_replace.replace('  ', ' ')
	ans += 1
lst = list(x)
if lst[0] == ' ':
	lst.remove(lst[0])
answer = ''.join(lst)
print(answer)


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)


a = input().split('WUB')
print(*a, sep=' ')


s1 = input()
s2 = s1.replace('WUB', ' ')
cont = 0
arr = []
for f in s2:
	arr.append(f)
for i in range(len(arr)):
	if arr[i] != ' ':
		cont = i
		break
	else:
		continue
for x in range(cont, len(arr)):
	print(arr[x], end='')


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('')
s += '  '
t = ''
x = len(s)
i = 0
while i < x:
	if s[i:i + 3] != 'WUB':
		t += s[i]
		i += 1
	else:
		t += ' '
		i += 3
x = len(t)
i = 0
y = ''
while i < x - 1:
	if t[i] == ' ' and t[i + 1] == ' ':
		y += t[i]
		i += 2
	else:
		y += t[i]
		i += 1
x = len(y)
if y[0] == ' ' and y[x - 1] == ' ':
	print(y[1:x])
elif y[0] == ' ':
	print(y[1:])
elif y[x - 1] == ' ':
	print(y[:x])
else:
	print(y)


name = input()
x = 'WUB'
y = name.replace(x, ' ')
print(y.strip())


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))


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


def sentence(s):
	wd = ''
	slist = []
	i = 0
	while i <= len(s) - 3:
		if s[i:i + 3] == 'WUB':
			slist.append(wd)
			i = i + 3
			wd = ''
		else:
			wd = wd + s[i]
			i = i + 1
	if i < len(s):
		slist.append(wd + s[i:])
	res = ' '.join(slist).lstrip().rstrip()
	return res
s = input()
print(sentence(s))


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


dubstep = input()
orglist = dubstep.split('WUB')
while orglist[0] == '':
	orglist.pop(0)
orgmix = ' '.join(orglist)
print(orgmix)


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 = input()
a = s.count('WUB')
s = s.replace('WUB', ' ', a)
s = s.strip()
print(s)


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))


c = input()
d = c.split('WUB')
if d[0] == '':
	d.remove('')
	print(' '.join(d))
else:
	print(' '.join(d))


import math
var = str(input())
print(var.replace('WUB', ' ').strip())


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()


pin = input().split('WUB')
for i in pin:
	if i == '':
		pin.remove(i)
pout = ' '.join(pin)
print(pout)


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 = str(input())
for i in range(len(s)):
	if s[i:i + 3] == 'WUB':
		s = s[:i] + ' ' + s[i + 3:]
print(s)


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


n = input()
x = []
print(n.replace('WUB', ' '))


s = str(input())
s = s.replace('WUB', ' ')
s = s.replace('  ', ' ')
s = s.lstrip()
print(s)


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


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=' ')


a = input()
a = a.replace('WUB', ' ')
if a[0] == ' ' and a[1] == ' ':
	a = a[2:]
elif a[0] == ' ':
	a = a[1:]
print(a)


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


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))


from sys import stdin, stdout
a = stdin.readline()
b = a.replace('WUB', ' ')
print(b)


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))


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


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()


s = input()
s1 = s.split('WUB')
res = ' '.join(s1)
print(res.lstrip())


x = input()
x = x.split('WUB')
word = ''
for i in x:
	if i == '':
		x.remove(i)
for j in x:
	word = word + j + ' '
print(word)


ifi = input()
ifi = ifi.replace('WUB', ' ')
print(ifi.strip())


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


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)


s = input()
z = s.replace('WUB', ' ')
v = ''
for i in range(len(z)):
	if z[i] is not ' ':
		v = z[i:]
		break
print(v)


text = input()
arr = text.split(sep='WUB')
arr = list(filter(lambda a: a != '', arr))
for each in arr:
	print(each, end=' ')


n = input()
s = 'WUB'
st = ''
st = n.replace(s, ' ')
st = st.strip(' ')
print(st)


s = input()
z = s.replace('WUB', ' ')
z = z.replace('  ', ' ')
c = z.strip(' ')
print(c)


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)


n = input()
m = n.replace('WUB', ' ')
print(m, end=' ')


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


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


s = input().replace('WUB', ' ')
i = 0
while i < len(s):
	if s[i] != ' ':
		break
	i += 1
s = s[i:]
print(s)


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)


def replace(a):
	return a.replace('WUB', ' ').strip()
a = input()
print(replace(a))


print(*[x for x in input().split('WUB') if x != '' and x != '\n'])


strg = str(input())
strgs = strg.replace('WUB', ' ')
print(strgs)


def remove(sub, s):
	return s.replace(sub, ' ', -1)
s = input()
print(remove('WUB', s))


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))


n = input()
st = n.replace('WUB', ' ')
print(st)


A = input()
A = A.replace('WUB', ' ')
print(A.strip())


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


from sys import stdin, stdout
h = map(str, stdin.readline().rstrip().split())
stri = ''
h = ''.join(h)
while h[0:3] == 'WUB':
	h = h[3:]
while h[-3:] == 'WUB':
	h = h[:-3]
i = 0
while i < len(h):
	if h[i:i + 3] == 'WUB':
		stri = stri + ' '
		i += 3
	else:
		stri = stri + h[i]
		i += 1
print(stri)


list = input().split('WUB')
result = ''
for word in list:
	if not word:
		continue
	result += word + ' '
result = result[:len(result) - 1]
print(result)


s = input()
k = s.replace('WUB', ' ')
l = k.strip()
print(l)


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()
a = ''
i = 0
while i < len(s):
	if s[i:i + 3] == 'WUB':
		i = i + 3
		a = a + ' '
		if i == len(s):
			break
	else:
		a = a + s[i]
		i = i + 1
k = 0
for i in range(len(a)):
	if a[i] == ' ':
		k = i + 1
	else:
		break
print(a[k:])


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


x = input()
f = x.replace('WUB', ' ')
print(f)


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


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


a = input()
b = int(a.count('WUB'))
i = 1
for i in range(b):
	a = a.replace('WUB', ' ')
a = a.strip()
i = 1
b = int(a.count('  '))
for i in range(b):
	a = a.replace('  ', ' ')
i = 1
b = int(a.count('   '))
for i in range(b):
	a = a.replace('   ', ' ')
print(a)


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()
l = s.split('WUB')
q = ''
for i in l:
	q = q + i + ' '
print(q[0:-1])


n = input().split('WUB')
b = []
for i in n:
	b.append(i)
print(' '.join(map(str, b)))


wub = input().split('WUB')
wub2 = []
for p in range(len(wub)):
	if wub[p].isalpha():
		wub2.append(wub[p])
print(' '.join(wub2))


from sys import stdin, stdout
import math
from fractions import gcd

def sin():
	return stdin.readline().rstrip()

def listInput():
	return list(map(int, sin().split()))

def printBS(li):
	if not li:
		return
	for i in range(len(li) - 1):
		stdout.write('%d ' % li[i])
	stdout.write('%d\n' % li[-1])
s = [i for i in sin().split('WUB') if i != '']
print(' '.join(s))


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)


z = list(input().split('WUB'))
for item in z:
	print(item, end=' ')


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', ' ')
for i in range(1, len(s)):
	s = s.replace(' ' * i, ' ')
print(s.strip())


s = input()
while s[:3] == 'WUB':
	s = s[3:]
s = s.replace('WUB', ' ')
print(s.rstrip())


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)


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


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)


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


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()


from collections import defaultdict as dd

def lcm(a, b):
	return a * b // gcd(a, b)

def inin():
	return int(input())

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

def ar(element, size):
	return [element for i in range(size)]

def digitsum(num):
	su = 0
	while num:
		su += num % 10
		num //= 10
	return su

def yes():
	print('YES')

def no():
	print('NO')

def countDivisibles(A, B, M):
	if A % M == 0:
		return B // M - A // M + 1
	return B // M - A // M

def countSetBits(n):
	count = 0
	while n:
		count += n & 1
		n >>= 1
	return count
Testcase = 1
for _ in range(Testcase):
	arr = input().split('WUB')
	print(*arr)


x = str(input())
z = x.replace('WUB', ' ')
print(z)


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)


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


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)


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


l = input()
s = ''
s = l.replace('WUB', ' ')
print(s)


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))


import sys
import math
input = sys.stdin.readline

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

def str_array():
	return input().strip().split()

def lower_letters():
	lowercase = []
	for i in range(97, 97 + 26):
		lowercase.append(chr(i))
	return lowercase

def upper_letters():
	uppercase = []
	for i in range(65, 65 + 26):
		uppercase.append(chr(i))
	return uppercase
word = input()
word = word.replace('WUB', ' ').strip()
print(word.replace('  ', ' ').strip())


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


remix = input()
remix = remix.replace('WUB', ' ').strip()
remixl = list(remix)
l = len(remix)
for i in range(l - 1):
	if remixl[i] == ' ' and remixl[i + 1] == ' ':
		remixl[i + 1] = ''
for x in remixl:
	print(x, end='')


import string
print(*' '.join(input().split('WUB')).strip().split())


dub_song = input()
print(dub_song.replace('WUB', ' '))


(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))


def main():
	s = input()
	for x in range(len(s)):
		y = s.replace('WUB', ' ')
	print(y)
main()


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 = str(input())
a = a.upper()
a = a.split('WUB')
a = ' '.join(a).strip()
print(a)


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))


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


s = str(input())
target = 'WUB'
print(s.replace(target, ' '))


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)


T = input()
T += 'WUB'
A = T.replace('WUB', ' ')
print(A)


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))


import sys

def main():
	input = sys.stdin.readline().strip()
	input = input.replace('WUB', ' ')
	input = input.strip(' ')
	input = input.replace('  ', ' ')
	print(input)
main()


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()
s = s.replace('WUB', ' ')
s = s.strip()
for i in range(len(s) - 1):
	try:
		if s[i] == ' ' and s[i + 1] == ' ':
			s = s[:i] + s[i + 1:]
	except IndexError:
		break
print(s)


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


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])


s = input()
t = s.split('WUB')
ans = ''
for q in t:
	if q.isalpha():
		ans += q + ' '
ans = ans[:-1]
print(ans)


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()
s = n.replace('WUB', ' ')
while True:
	if s[0] == ' ':
		s = s[1:]
	else:
		break
while True:
	if s[-1] == ' ':
		s = s[:-1]
	else:
		break
print(s)


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=' ')


s = input()
y = s.replace('WUB', ' ')
print(y)


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))


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


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


x = input()
s = x.split('WUB')
for i in s:
	if i == '':
		s.remove(i)
h = ' '.join(s)
print(h)


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)


v = input().split('WUB')
str = ''
for i in v:
	str = str + ' ' + i
print(str)


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)


from sys import stdin, stdout
song_with_WUB = stdin.readline()
stdout.write(song_with_WUB.replace('WUB', ' ').strip() + '\n')


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


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


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)


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


s = input()
from re import *
print(sub(' \\Z', '', sub('\\A ', '', sub('\\s+', ' ', sub('WUB', ' ', s)))))


d = input()
print(d.replace('WUB', ' '))


n = input()
re = n.split('WUB')
while '' in re:
	re.remove('')
fi = ' '.join(re)
print(fi)


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


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=' ')


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


a = input()
d = 0
a = a.replace('WUB', ' ')
a = list(a)
while a[0] == ' ':
	a.pop(0)
while a[-1] == ' ':
	a.pop(-1)
c = [print(i, end='') for i in a]


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))


line = input()
L = line.replace('WUB', ' ')
L = L.lstrip()
L = L.rstrip()
print(L)


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 = input()
o = s.replace('WUB', ' ')
if o[0] == ' ':
	print(o[1:])
else:
	print(o)


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 = input()
s1 = ''
s = s.replace('WUB', ' ')
for i in range(len(s)):
	if s[i] == ' ':
		s = s.replace(' ', '-', 1)
	else:
		break
s = s[::-1]
for i in range(len(s)):
	if s[i] == ' ':
		s = s.replace(' ', '-', 1)
	else:
		break
s = s[::-1]
s = s.replace('-', '')
s = s.replace('  ', ' ')
print(s)


str = input().split('WUB')
print(*str)


x = input()
cont = 0
re = ''
l = 0
d = x + 'aaa'
for i in range(0, len(x)):
	if cont == len(d) - 3:
		break
	if d[cont] == 'W' and d[cont + 1] == 'U' and (d[cont + 2] == 'B'):
		if d[cont + 3] != 'w' and l >= 1 and (cont + 3 != len(x)):
			re = re + ' '
		cont = cont + 3
	else:
		re = re + x[cont]
		cont = cont + 1
		l = l + 1
print(re)


s = input()
while len(s) > 3 and s[0] == 'W' and (s[1] == 'U') and (s[2] == 'B'):
	s = s[3:]
while len(s) > 3 and s[-3] == 'W' and (s[-2] == 'U') and (s[-1] == 'B'):
	s = s[:len(s) - 3]
i = 0
n = len(s)
out = ''
while i <= n - 3 and n >= 3:
	if n < 3:
		out = s
		break
	if i == 0 and s[0] == 'W':
		if s[i + 1] == 'U' and s[i + 2] == 'B':
			i += 3
			continue
		else:
			out += s[i]
			i += 1
			continue
	if s[i] == 'W':
		if s[i + 1] == 'U' and s[i + 2] == 'B':
			out += ' '
			if i + 3 == n - 2:
				out += s[n - 2] + s[n - 1]
			elif i + 3 == n - 1:
				out += s[n - 1]
			i += 3
			continue
		else:
			out += s[i]
			i += 1
			continue
	else:
		out += s[i]
		i += 1
		if i > n - 3:
			out += s[n - 2] + s[n - 1]
if n < 3:
	out = s
out = ' '.join(out.split())
print(out)


a = input()
a = a.split('WUB')
a = ' '.join(a)
if a[0] == ' ':
	a = a[1:]
if a.find('  '):
	a = a.replace('  ', ' ')
print(a)


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)


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


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


import sys
string = sys.stdin.readline().strip()
print(string.replace('WUB', ' '))


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


s = input()
l = list(s)
m = []
flag = 0
count = 0
for i in range(0, len(l)):
	if l[i] == 'W' and i <= len(l) - 3:
		if l[i] == 'W' and l[i + 1] == 'U' and (l[i + 2] == 'B'):
			flag = 3
			if count == 1:
				m.append(' ')
	if flag == 0:
		m.append(l[i])
		count = 1
	if flag > 0:
		flag = flag - 1
for i in range(0, len(m)):
	print(m[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)


from sys import stdin, stdout
song = stdin.readline()
song = song.split('WUB')
print(' '.join(song).strip())


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())


l = input()
l = l.replace('WUB', ' ')
l = l.strip()
print(l)


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()


def Dubstep(s):
	x = s.replace('WUB', ' ')
	x = x.lstrip()
	x = x.rstrip()
	return x
s = input()
print(Dubstep(s))


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)


st = input()
print(st.replace('WUB', ' '))


s = input()
s = s.split('WUB')
for words in s:
	print(words + ' ')


n = str(input())
d = ''
c = n.replace('WUB', ' ')
for d in range(200):
	e = c.replace('  ', ' ')
print(e[0:])


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))


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


import re
S = input()
R = S.split('WUB')
R = [x for x in R if x]
print(' '.join(R))


def original_song(str):
	list = str.split('WUB')
	print(' '.join(list))
str = input('')
original_song(str)


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


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)


def dj(s):
	check = 'WUB'
	if s.find(check) >= 0:
		x = s.replace(check, ' ')
		print(x.strip())
	else:
		print(s)
s = input()
dj(s)


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


s = input('')
slise = 'WUB'
s = s.replace(slise, ' ')
print(s)


def dubstep(s):
	z = s.replace('WUB', ' ')
	return z.strip()
print(dubstep(input()))


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())


def main():
	newSong = input()
	i = 0
	oldSong = ''
	while i < len(newSong):
		index = newSong.find('WUB')
		if index == i:
			if index == 0:
				oldSong = newSong[i + 3:]
			else:
				oldSong = oldSong + newSong[:i] + ' ' + newSong[i + 3:]
			newSong = oldSong
			oldSong = ''
		elif index == -1:
			break
		else:
			i = index
	print(newSong.rstrip())
main()


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)


texta = input()
a = texta.replace('WUB', '_')
st = 0
for c in a:
	if c == '_':
		st += 1
	else:
		break
b = a[st:]
rez = b.replace('_', ' ')
print(rez)


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


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()
new = s.replace('WUB', ' ')
print(new)


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)


t = input('')
print(t.replace('WUB', ' '))


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='')


s = input()
a = s.split('WUB')
s = ''
for t in a:
	if t != '':
		print(t)


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)


remix_song = input('')
song_list = list(remix_song.split('WUB'))
for i in song_list:
	if i == '':
		song_list.remove(i)
song = ' '.join(song_list)
print(song)


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)


s = input()
while 'WUB' in s:
	s = s[:s.index('WUB')] + ' ' + s[s.index('WUB') + 3:]
s = s.strip()
print(s)


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()
for i in range(len(s)):
	if 'WUB' in s:
		s = s.replace('WUB', ' ')
print(s.strip(' '))


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)


import re
inpStr = input()
exp = re.compile('[A-Za-z]+')
print(*exp.findall(inpStr.replace('WUB', ' ')))


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 string
s = input()
a = s.replace('WUB', ' ')
del s
s = a.lstrip()
del a
a = s.rstrip()
print(a)


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))


t = input()
a = t.replace('WUB', ' ')
b = a.split(sep=' ')
for x in b:
	if x == '':
		b.remove('')
print(' '.join(b))


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


s = input().split('WUB')
i = 0
S = []
while i < len(s):
	if s[i] != '':
		S.append(s[i])
		i += 1
	else:
		i += 1
for i in S:
	print(i)


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])


s = input()
a = ''
for i in s:
	a = a + i
	if a[-3:] == 'WUB':
		x = len(a)
		a = a[:x - 3]
		a = a + ' '
print(a.strip())


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=' ')


line = input()
line = line.replace('WUB', ' ')
index = 1
while True:
	if index >= len(line):
		break
	if line[index] == ' ' and line[index - 1] == ' ':
		line = line[:index] + line[index + 1:]
	index += 1
print(line)


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


st = input()
st = st.replace('WUB', ' ')
print(st.lstrip())


def dubstep():
	n = input()
	l = len(n)
	k = n.replace('WUB', ' ')
	print(k.strip())
dubstep()


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())


string1 = input()
string2 = string1.replace('WUB', ' ')
displaystring = string2.strip()
displaystring = displaystring.replace('  ', ' ')
print(displaystring)


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


string = input('')
if string.count('WUB') == 0:
	print(string)
else:
	x = string.split('WUB')
	for i in x:
		if i == '':
			x.remove('')
	y = ' '.join(x)
	print(y)


line = input()
while len(line) >= 3 and line[0:3] == 'WUB':
	line = line[3:]
while len(line) >= 3:
	if line[0:3] == 'WUB':
		print('', end=' ')
		line = line[3:]
	else:
		print(line[0], end='')
		line = line[1:]
print(line)


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


n = str.upper(input())
print(n.replace('WUB', ' '))


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


def restore(string):
	tmp = []
	originalSong = ''
	W = 0
	U = 0
	B = 0
	for i in string:
		tmp.append(str(i))
		if str(i) != 'W' and str(i) != 'B' and (str(i) != 'U'):
			W = 0
			U = 0
			B = 0
		if str(i) == 'W':
			W = 1
		if str(i) == 'U' and W == 1:
			U = 1
		if str(i) == 'B' and U == 1:
			B = 1
		if W == 1 and B == 1 and (U == 1):
			tmp.pop()
			tmp.pop()
			tmp.pop()
			if len(tmp) != 0:
				originalSong += ''.join(tmp) + ' '
				tmp.clear()
			W = 0
			B = 0
			U = 0
	if len(tmp) != 0:
		originalSong += ''.join(tmp)
		return originalSong
	if originalSong != '':
		return originalSong
string = str(input())
song = restore(string)
for i in song:
	print(i, end='')


text = input()
p = text.replace('WUB', ' ')
print(p)


s = list(input())
x = ''
n = len(s)
i = 0
c = 0
while i < n:
	if i + 2 < n and s[i] == 'W' and (s[i + 1] == 'U') and (s[i + 2] == 'B'):
		i += 3
		x += ' '
	else:
		x += s[i]
		i += 1
print(x)


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())


def dewub(lis):
	try:
		for i in range(len(lis)):
			if lis[i] == '':
				lis = lis[:i] + lis[i + 1:]
	except IndexError:
		pass
	return lis
lis = input().split('WUB')
print(' '.join(dewub(lis)))


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=' ')


s = input()
l = list(s.split(sep='WUB'))
lk = ' '
for i in l:
	if i == '':
		l.remove('')
lk = lk.join(l)
print(lk)


while True:
	ch = input()
	if len(ch) >= 1 and len(ch) <= 200:
		break
out = ''
out = ch.replace('WUB', ' ').strip()
print(out)


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))


a = input()
a = a.replace('WUB', ' ')
a = a.replace('  ', ' ')
if a[0] == ' ':
	print(a.strip())
else:
	print(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)


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


def bruh():
	print(input().replace('WUB', ' ').strip())
bruh()


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)


line = input()
list = line.split('WUB')
for i in list:
	if i == '':
		list.remove(i)
print(' '.join(list))


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()


n = input()
n = n.replace('WUB', '#')
i = 0
j = 0
c = []
k = 0
while j < len(n):
	while i < len(n) and n[i] != '#':
		c.append(n[i])
		i += 1
		j += 1
		k += 1
	if k != 0:
		c.append(' ')
	j += 1
	i += 1
c = ''.join(c)
print(c)


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 != '']


def main():
	string = input()
	string = string.replace('WUB', ' ')
	string = ''.join([w for w in string if w])
	print(string.strip())
main()


n = input().split('WUB')
if n[0] == '':
	del n[0]
if n[len(n) - 1] == '':
	n.pop()
print(' '.join(n))


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


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


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))


remix = input()
l = remix.split('WUB')
real = ''
for i in range(len(l)):
	if real == '':
		real = real + l[i]
	else:
		real = real + ' ' + l[i]
print(real)


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


remix = input().split('WUB')
orig = ''
for i in remix:
	orig += i + ' '
print(orig.strip())


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=' ')


s = input()
s1 = ''
i = 0
while i < len(s):
	if s[i:i + 3] == 'WUB':
		s1 = s1 + ' '
		i += 3
	else:
		s1 = s1 + s[i]
		i += 1
s1 = s1.strip(' ').split(' ')
for strng in s1:
	if strng == '':
		s1.remove(strng)
s1 = ' '.join(s1)
print(s1)


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()


s = input()
s = s.replace('WUB', ' ', len(s))
print(s)


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()
b = s.replace('WUB', ' ')
print(b)


import re
s = input()
reg = re.compile('WUB')
print(reg.sub(' ', s))


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))


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


lyric = input()
song = lyric.replace('WUB', ' ')
songlist = list(song)
t = 0
while t < len(songlist):
	if songlist[t] == ' ':
		del songlist[t]
		t = t - 1
	else:
		break
	t = t + 1
t = 0
while t < len(songlist):
	if songlist[-t - 1] == ' ':
		del songlist[-t - 1]
		t = t - 1
	else:
		break
	t = t + 1
output = ''.join(songlist)
print(output)


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])


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


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


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


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=' ')


import re
x = input()
print(' '.join(re.split('WUB+?', x)))


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)


from sys import stdin
from sys import stdout
s = stdin.readline()
k = s.replace('WUB', ' ')
t = k.replace('  ', ' ')
stdout.write(str(t.strip()))


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)


def wub(val):
	val = val.replace('WUB', ' ')
	val = val.strip()
	return val
val = input()
print(wub(val))


def main():
	from sys import stdin, stdout
	s = stdin.readline().strip()
	stdout.write(s.replace('WUB', ' ').strip())
main()


song = input()
if song != '' and song.upper():
	print(song.replace('WUB', ' '))


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)


from sys import stdin, stdout
song = stdin.readline()
stdout.write(' '.join(song.split('WUB')).strip() + '\n')


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])


l = list(input().split('WUB'))
r = ''
for i in l:
	r = r + i + ' '
n = len(r)
r = r[:n - 1]
print(r)


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


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


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)


word = input()
word2 = word.replace('WUB', ' ')
word3 = word2.replace('   ', ' ')
print(word3)


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)


class Code:

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

	def process(self):
		print(*self.s)
code = Code()
code.process()


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=' ')


def dubsteps(string):
	st = string.split('WUB')
	s = ''
	for i in st:
		if i != 'WUB':
			s += i + ' '
	return s.lstrip()
print(dubsteps(input()))


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()))


wubby_string = input()
final_string = wubby_string.replace('WUB', ' ')
final_string = final_string.strip()
print(final_string)


ab = input()
ab = ab.replace('WUB', ' ')
ab = ab.replace('  ', ' ')
print(ab.strip())


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


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)


s = input()
for i in range(len(s) - 2):
	st = s[i:i + 3]
	if st == 'WUB':
		s = s.replace(st, ' ')
	else:
		continue
print(s.strip())


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)


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


import re
S = input()
print(re.sub('WUB', ' ', S))


n = input()
n = n.replace('WUB', ' ')
for i in range(len(n)):
	n = n.replace('  ', ' ')
	n = n.lstrip(' ')
print(n)


ch = input()
print(ch.replace('WUB', ' '))


s = input()
for i in range(0, len(s)):
	if s.find('WUB') != -1:
		if s.find('WUB') == 0:
			k = s.find('WUB')
			s = s[0:k] + s[k + 3:-1] + s[-1]
		elif s.find('WUB') == len(s) - 3:
			s = s[0:-3]
		else:
			k = s.find('WUB')
			s = s[0:k] + ' ' + s[k + 3:-1] + s[-1]
print(s)


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)


a = input()
d = ''
h = ''
for i in range(len(a)):
	if a[i:i + 3] == 'WUB':
		a = a.replace(a[i:i + 3], ' ')
h = a.strip(' ')
print(h)


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 = str(input()).upper()
a = a.replace('WUB', ' ')
print(a.strip())


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


def main():
	s = input()
	s2 = ' '.join(s.split('WUB'))
	print(s2.strip())
main()


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()
n = s.count('WUB')
s = s.replace('WUB', ' ', n)
print(s.strip())


n = input()
ans = []
pre = 0
i = 0
j = 0
old = ['W', 'U', 'B']
a = []
x = 0
while i < len(n):
	if n[i] == old[j]:
		a.append(n[i])
		j += 1
	else:
		a.append(n[i])
	if j > 2:
		m = ''
		a.pop(-1)
		a.pop(-1)
		a.pop(-1)
		if len(a) != 0:
			for z in a:
				m += z
			ans.append(m)
		a.clear()
		j = 0
	if pre == j:
		if n[i] in old:
			j = 1
			pre = 1
		else:
			pre = 0
			j = 0
	else:
		pre = j
	i += 1
m = ''
for i in a:
	m += i
ans.append(m)
print(' '.join(ans))


words = input().replace('WUB', ' ').strip().split()
for word in words:
	print(word)


a = input()
a = a.split('WUB')
a = ' '.join(a)
a = a.lstrip()
a = a.rstrip()
print(a)


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])


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


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


j = input().split('WUB')
for item in j:
	if item == '':
		j.remove('')
print(' '.join(j))


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


import sys
from sys import stdin, stdout

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

def get_string():
	return sys.stdin.readline().strip()
arr = get_string()
flag = 1
arr2 = ''
if 'WUB' in arr:
	arr1 = arr.replace('WUB', ' ')
	flag = 0
d = 0
arr2 = arr.replace('WUB', ' ')
if flag == 0:
	for i in range(0, len(arr1)):
		if arr1[i] == ' ' and d == 0:
			arr2 = arr1.replace(' ', '', 1)
		if arr[i] != ' ':
			d = 1
			break
print(arr2)


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)


stra = input()
lista = stra.split('WUB')
for i in lista:
	if i == '':
		del i
print(' '.join(lista))


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


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()
st = s.replace('WUB', ' ')
print(st)


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)


org = input()
seq = org.split('WUB')
n = len(seq)
a = ' '.join(seq)
b = a.strip()
print(b)


dubStep = input()
word = dubStep.replace('WUBWUB', ' ')
word = word.replace('WUB', ' ')
for i in range(10):
	if word[0] == ' ':
		word = word.replace(' ', '', 1)
print(word)


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


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


import re
p = re.compile('WUB', re.IGNORECASE)
s = input()
l = p.split(s)
print(' '.join(l).strip())


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))


word = input()
if 'WUB' in word:
	word = word.replace('WUB', ' ', -1)
print(word.strip())


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


data = input()
song = data.split('WUB')
actual = ''
for i in song:
	actual = actual + i + ' '
actual = actual.strip()
print(actual)


x = input()
a = []
a = x.split('WUB')
x = ' '.join(a)
print(x)


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)))


S = input()
Ans = []
i = 0
while i + 2 < len(S) and (S[i] == 'W' and S[i + 1] == 'U' and (S[i + 2] == 'B')):
	i += 3
cur = ''
while i < len(S):
	if i + 2 >= len(S) or (S[i] == 'W' and S[i + 1] == 'U' and (S[i + 2] == 'B')) == False:
		cur += S[i]
		i += 1
	else:
		Ans += [cur]
		cur = ''
		i += 3
if cur != '':
	Ans += [cur]
for a in Ans:
	print(a, end=' ')


str = input().strip()
str = str.split('WUB')
res = ''
for item in str:
	res += item
print(' '.join(str).strip())


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()))


string = input()
result = string.replace('WUB', ' ').rstrip().lstrip()
print(result)


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


text = input('')
text1 = text.replace('WUB', ' ')
print(text1)


something = input()
b = something.replace('WUB', ' ').split(' ')
new_list = [elem for elem in b if elem.strip()]
print(' '.join(new_list))


x = input()
for j in x:
	x = x.replace('WUB', ' ')
print(x)


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))


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


def main():
	string = input()
	string = string.replace('WUB', ' ')
	string = string.strip()
	print(string)
import sys
sys.exit(main())


import re
a = input()
match = re.search('^(WUB)*(.+)(WUB)*$', a)
print(match.group(2).replace('WUB', ' '))


input_str = input()
answer = input_str.replace('WUB', ' ').strip()
print(answer)


n = input().replace('WUB', ' ')
while n[0] == ' ':
	n = n[1:]
print(n)


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


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))


def main():
	x = input()
	if 'WUB' in x:
		x = x.replace('WUB', ' ')
		print(x.strip())
	else:
		print(x)
main()


s = input()
if 'WUB' in s:
	x = s.replace('WUB', ' ').strip()
	print(x)
else:
	print(s)


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=' ')


x = str(input())
d = x.replace('WUB', ' ')
print(d)


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=' ')


w = input()
p = w.replace('WUB', ' ')
print(p)


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


import sys

def main():
	word = sys.stdin.readline().rstrip()
	x = word.split('WUB')
	sys.stdout.write(f"{' '.join(x).lstrip().rstrip()}")
main()


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=' ')


s = input()
sn = s.replace('WUB', ' ')
f = sn[0]
while f == ' ':
	sn = sn[1:]
	f = sn[0]
print(sn)


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


n = input().upper()
t = n.split('WUB')
z = ' '.join(t)
print(z.lstrip())


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


n = input()
k = n.replace('WUB', ' ')
k = k.lstrip()
print(k.rstrip())


lyrics = input().strip()
print(lyrics.replace('WUB', ' ').strip())


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)


from sys import stdin, stdout
string = stdin.readline()
original_string = ''
count = 0
for i in range(len(string) - 2):
	if string[i] + string[i + 1] + string[i + 2] == 'WUB' and count == 0:
		count = 2
		original_string += ' '
	elif count > 0:
		count -= 1
	elif count == 0:
		original_string += string[i]
if count == 0:
	original_string += string[-2:]
elif count == 1:
	original_string += string[-1]
stdout.write(original_string.strip())


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


x = input()
X = x.replace('WUB', ' ')
print(X.lstrip())


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 != '']))


a = input().upper()
a = a.replace('WUB', ' ')
a = a.split(' ')
list1 = []
for x in a:
	if x.isalpha():
		list1.append(x)
list2 = ' '.join(list1)
print(list2)


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)


m = input()
b = m.split('WUB')
print(*b)


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())


string = input()
s = string.replace('WUB', ' ')
print(s)


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


s = input()
s1 = s.split('WUB')
for i in range(len(s1)):
	if s1[0] == '':
		del s1[0]
	else:
		break
print(' '.join(s1))


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 = str(input())
a = s.split('WUB')
print(' '.join(a))


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()


a = input() + 'WUB'
b = ''
d = 1
l = 0
i = 0
while i < len(a) - 3:
	if a[i] == 'W' and a[i + 1] == 'U' and (a[i + 2] == 'B'):
		if l == 1:
			b = b + ' '
		i += 3
	else:
		l = 1
		b = b + a[i]
		i += 1
print(b)


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()
c = ''
ch = ''
i = 0
while 'WUB' == s[i:i + 3]:
	i += 3
j = i
if s[-1] == 'W':
	ch = s[-1]
	s = s[:-1]
elif s == 'U':
	pass
elif s[-1] == 'U' and s[-2] == 'W':
	ch = s[-2:]
	s = s[:-2]
while j < len(s):
	if s[j] == 'W' and s[j + 1] == 'U' and (s[j + 2] == 'B'):
		if c[-1] == ' ':
			j += 3
			continue
		c += ' '
		j += 3
		continue
	else:
		c += s[j]
		j += 1
if ch != '':
	c += ch
print(c)


s = input()
ans = s.replace('WUB', ' ')
l = ans.split(' ')
s = []
for x in l:
	if x == '':
		continue
	else:
		s.append(x)
print(' '.join(s))


n = str(input())
b = n.replace('WUB', ' ')
print(b)


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


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())


s = input()
l = s.split('WUB')
li = ' '.join(l)
if li[0] == ' ':
	print(li[1:])
else:
	print(li)


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=' ')


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


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()


x = input()
x = x.upper()
for i in x:
	if 'WUB' in x:
		x = x.split('WUB')
		x = ' '.join(x)
		x = x.strip()
print(x)


import math
import os
import random
import re
import sys
s = str(input())
s = s.replace('WUB', ' ')
print(s.strip())


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)


def f():
	strring = input()
	strring = strring.split('WUB')
	for x in strring:
		if x == '':
			strring.remove(x)
	print(*strring)
f()


dubstep_song = input()
dubstep_song = dubstep_song.replace('WUB', ' ')
dubstep_song = dubstep_song.replace('   ', ' ')
print(dubstep_song)


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))))


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


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))


s = input()
for i in range(len(s)):
	s = s.replace('WUB', ' ')
while True:
	if s[0] == ' ':
		s = s[1:]
	else:
		break
while True:
	if s[-1] == ' ':
		s = s[:-1]
	else:
		break
print(s)


s = input()
fr = s.replace('WUB', ' ')
sr = fr.replace('  ', ' ')
print(sr.lstrip())


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))


x = input()
le = len(x)
checker = 0
checker2 = 0
i = 0
while i < le:
	checker = 0
	if x[i] == 'W' and i < le - 2:
		if x[i + 1] == 'U':
			if x[i + 2] == 'B':
				i = i + 3
				if checker2 == 1:
					print(' ', end='')
				checker = 1
	if checker == 0:
		print(x[i], end='')
		checker2 = 1
		i += 1


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=' ')


s = input()
q = []
s = s.split('WUB')
for i in s:
	if i != '':
		q.append(i)
		q.append(' ')
if len(q) == 2:
	print(q[0])
else:
	for i in range(len(q) - 1):
		print(q[i])


remix = input()
original = remix.replace('WUB', ' ')
print(original)


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())


x = input()
y = 'WUB' in x
if y == False:
	print(x)
else:
	x = x.replace('WUB', ' ')
	x = x.strip()
	print(x)


s = input()
s_wub = 'WUB'
i = 0
j = -1
if len(s) >= 3 or s_wub in s:
	while True:
		if s[i] == 'W':
			if s[i + 1] == 'U' and s[i + 2] == 'B':
				s = s[i + 3:]
				i = 0
			else:
				break
		else:
			break
		if s[j] == 'B':
			if s[j - 1] == 'U' and s[j - 2] == 'W':
				s = s[:j - 2]
				j = -1
			else:
				break
		else:
			break
	i = 0
	while True:
		if i + 1 == len(s) or i + 2 >= len(s):
			break
		if s[i] == 'W':
			if s[i + 1] == 'U' and s[i + 2] == 'B':
				s = s[0:i] + ' ' + s[i + 3:]
		i += 1
	print(s)
elif s_wub not in s:
	print(s)


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=' ')


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


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


string = input()
if 'WUB' in string:
	result = string.replace('WUB', ' ')
else:
	result = string
print(result)


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
S = input()
print(' '.join(S.split('WUB')).strip())


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])


strr = input()
strr = str(strr)
strr = strr.replace('WUB', ' ')
print(strr)


s = input()
l = list(s.replace('WUB', ' '))
print(''.join(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))


n = str(input()).split('WUB')
if n[0] == '':
	n.remove(n[0])
for i in n:
	if i == '':
		if i == '':
			n.remove(i)
	else:
		pass
nn = ' '.join(n)
print(nn)


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


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


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)


l = list(input().split('WUB'))
li = l.copy()
n = len(l)
l2 = []
for x in l:
	if x == '':
		li.remove(x)
print(' '.join((str(i) for i in l)))


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=' ')


try:
	s = input()
	s = s.replace('WUB', ' ')
	s = s.strip()
	print(s)
except:
	pass


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)


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


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)


lyrics = input()
l = lyrics.split('WUB')
ll = []
j = ''
for i in l:
	if i == '':
		ll.append(' ')
	elif j == '':
		ll.append(i)
	else:
		ll.append(' ')
		ll.append(i)
	j = i
ll = ''.join(ll)
ll.strip()
print(ll)


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()))


l = input().split('WUB')
l.append('')
l.remove('')
l2 = ' '.join(l)
print(l2)


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())


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


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=' ')


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


import math
data = list(input())
i = 0
cnt = 0
while True:
	if i > len(data) - 3:
		break
	if data[i] == 'W' and data[i + 1] == 'U' and (data[i + 2] == 'B'):
		if cnt == 0:
			del data[i]
			del data[i]
			del data[i]
		else:
			data[i] = ' '
			del data[i + 1]
			del data[i + 1]
	else:
		cnt = 1
		i += 1
print(''.join(data))


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)


s = input()
x = s.replace('WUB', ' ')
y = x.strip()
print(y)


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())


word = input().replace('WUB', ' ')
for i in range(len(word)):
	while word[i] == ' ':
		word.replace(word[i], '')
		break
word[::-1]
for i in range(len(word)):
	while word[i] == ' ':
		word.replace(word[i], '')
		break
print(word)


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


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


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)


n = input()
s = n.split('WUB')
for i in s:
	try:
		s.remove('')
	except ValueError:
		break
print(*s)


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)


text = input()
print(text.replace('WUB', ' '))


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)


import re
s = 'WUB'
song = re.split(s, input())
for i in song:
	if i:
		print(i)


k = input().upper()
j = k.replace('WUB', ' ')
print(j.lstrip())


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=' ')


a = str(input())
print(' '.join(a.split('WUB')))
for i in range(10):
	print('')


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()
x = s.split('WUB')
print(*x)


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))


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


s = input()
s1 = s.replace('WUB', ' ')
s1 = s1.lstrip()
s1 = s1.rstrip()
num_ = s1.count(' ')
for i in range(num_):
	if ' ' * (i + 1) in s1:
		s1 = s1.replace(' ' * (i + 1), ' ')
print(s1)


import re
n = input()
s = n.replace('WUB', ' ')
print(s)


a = list(map(str, input().split('WUB')))
for i in a:
	if i == '':
		a.remove('')
print(' '.join(a))


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)


str1 = input()
str1 = str1.replace('WUB', ' ')
print(str1)


str1 = input()
str2 = str1.replace('WUB', ' ')
str3 = str2.lstrip()
str4 = str3.rstrip()
print(str4)


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)


song = input().split('WUB')
for so in song:
	print(so, end=' ')


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


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)


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)
a = a.replace('WUB', ' ').strip()
print(a)


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)


a = input()
a = a.replace('WUB', ' ')
a = a.strip(' ')
(a, b) = (list(a), '')
for i in range(len(a)):
	if a[i].isupper():
		print(a[i], end='')
		if i + 1 < len(a) and a[i + 1] == ' ':
			print(' ', end='')


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())


a = input()
a = a.replace('WUB', ' ')
a = a.replace('  ', ' ')
a = a.replace('   ', ' ')
if a[0] == ' ':
	print(a[1:len(a)])
else:
	print(a[0:len(a)])


g = input()
i = ','.join(g.split('WUBWUB'))
k = i.split('WUB')
print(','.join(k).replace(',', ' ').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=' ')


s = input()

def remove(sub, s):
	return s.replace(sub, ' ')
print(remove('WUB', s).strip())


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()


line = input().strip('\n\r\t ')
while line.startswith('WUB'):
	line = line[3:]
while line.endswith('WUB'):
	line = line[:-3]
print(line.replace('WUB', ' '))


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()))


x = input()
x = x.replace('WUB', ' ')
if x[:1] == ' ':
	x = x[1:len(x)]
a = x
for i in range(1, len(x)):
	if x[i] == x[i - 1]:
		if x[i] == ' ':
			a = x[:i - 1] + x[i:len(x)]
print(a)


__author__ = 'runekri3'
song = input()
words = [word for word in song.split('WUB') if len(word) > 0]
print(' '.join(words))


def f():
	print(*input().split('WUB'))
f()


import re
print(re.sub('^(WUB)+|(WUB)+$', '', input()).replace('WUB', ' '))


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)


string = input()
l = len(string)
s = 'WUB'
newstring = ''
i = 0
while i < l:
	if i + 2 < l:
		a = string[i:i + 3]
		if a != s:
			newstring += string[i:]
			break
		else:
			i = i + 3
	else:
		newstring += string[i:]
		break
i = len(newstring) - 1
finals = ''
while i >= 0:
	if i - 2 >= 0:
		a = newstring[i - 2:i + 1]
		if a != s:
			finals += newstring[:i + 1]
			break
		else:
			i = i - 3
	else:
		finals += newstring[:i + 1]
		break
finals = finals.split('WUB')
for i in finals:
	print(i, end=' ')


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)


a = input()
b = a.replace('WUB', ' ').replace('  ', ' ').rstrip().lstrip()
print(b)


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


musica = str(input())
musica = musica.upper()
nome = 'WUB'
saida = ''
musica = musica.replace(nome, ' ')
letras = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
contador = 0
for i in musica:
	if i in letras:
		saida += i
		contador = 1
	if i == ' ' and contador == 1:
		saida += i
		contador = 0
print(saida)


def main():
	S = input().rstrip().replace('WUB', ' ').split()
	print(*S)
main()


a = input()
n = len(a)
flag = 0
chk = 'WUB'
b = ''
i = 0
while i < n:
	if a[i:i + 3] == chk:
		if flag == 1:
			b += ' '
		i += 3
	else:
		flag = 1
		b += a[i]
		i += 1
print(b)


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)


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


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))


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