import java.util.*;
public class Dubstep {
    public Dubstep() {
    }
    public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String k = sc.nextLine();
		String[]  k1 = k.split("WUB");
		StringBuilder sb = new StringBuilder();
		for(int i = 0 ; i<k1.length ; i++){
			sb.append(k1[i] + "~");

		}
		String s1 = sb.toString().trim();
		String[] k2 = s1.split("~");
		for(int i = 0 ; i <k2.length ; i++){
			System.out.print(k2[i] + " ");
		}
    }
}

import java.util.Scanner;

public class Dubstep {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        s = s.replaceAll("WUB", " ");
        s = s.replaceAll("\\s{2,}", " ");
        s = s.trim();
        System.out.println(s);
    }
}

import java.util.Scanner;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author hrzd7816
 */
public class Phase1ProblemDubStep {

      private static String getSong(String input) {
          StringBuilder sb = new StringBuilder();
          boolean newWord = true;
          int i = 0;
          for (i = 0; i < input.length() - 3; i++) {
              if(input.charAt(i) == 'W' && input.charAt(i + 1) == 'U' && input.charAt(i + 2) == 'B') {
                  i = i + 2;
                  newWord = true;
              }
              else {
                  if(newWord)
                      sb.append(' ');
                  sb.append(input.charAt(i));
                  newWord = false;
              }
          }
          if (i < input.length() -2 && input.charAt(i) == 'W' && input.charAt(i + 1) == 'U' && input.charAt(i + 2) == 'B') {
              i = i + 2;
              newWord = true;
          } else {
              if (newWord) {
                  sb.append(' ');
              }
              if(i < input.length())
                sb.append(input.charAt(i));
              if(i < input.length() - 1)
                sb.append(input.charAt(i + 1));
              if(i < input.length() - 2)
                sb.append(input.charAt(i + 2));
              newWord = false;
          }
          return sb.toString().trim();
    }

      public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNextLine()) {
            String input = sc.nextLine();
            System.out.println(getSong(input));
        }

    }

}

import java.util.*;

public class codeforce
{
	public static void main(String args[])
	{
		Scanner sj = new Scanner(System.in);

		String s = sj.next();
		System.out.println(s.replaceAll("WUB", " ").trim());

	}
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String  s=in.nextLine();
        s=s.replaceAll("WUB"," ");

        System.out.println(s);
    }

}

import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;

public class tr {

    private static final Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) throws IOException {
    	String s=scanner.next();
    	String f="";
    	if(s.indexOf("WUB")==-1){
    		f=f+s;
    	}
    	else if(s.indexOf("WUB")!=0){
    		int u=s.indexOf("WUB");
    		f=f+s.substring(0,u)+" ";
    		for(int i=u;i<s.length();i++){
        		int a=s.indexOf("WUB",i);
        		int b=s.indexOf("WUB",a+3);
        		if(a+3==b){
        			i=b-1;
        			continue;
        		}
        		else{
        			if(b==-1){
        				f=f+s.substring(a+3)+" ";
        				break;
        			}
        		f=f+s.substring(a+3,b)+" ";
        		i=b-1;
        	}
        	}
    	}
    	else if(s.indexOf("WUB")==0){
    	for(int i=0;i<s.length();i++){
    		int a=s.indexOf("WUB",i);
    		int b=s.indexOf("WUB",a+3);
    		if(a+3==b){
    			i=b-1;
    			continue;
    		}
    		else{
    			if(b==-1){
    				f=f+s.substring(a+3)+" ";
    				break;
    			}
    		f=f+s.substring(a+3,b)+" ";
    		i=b-1;
    	}
    	}

    	}
    	System.out.println(f);
    }
}

import java.util.*;
public class hardwork {
    //http://codeforces.com/problemset/problem/131/B
    //http://codeforces.com/problemset/problem/1/B
      //public static int  count=0;
     // public static int  j=0;
     //public static String ff="";
    // public static String re="";
    // public static boolean x=false;
    //http://codeforces.com/problemset/problem/49/A
      public static void main(String[] args) {
       Scanner input =new Scanner(System.in);

     String A=input.next().replaceAll("WUB","*");
      StringTokenizer S=new StringTokenizer(A,"*");
     while(S.hasMoreTokens())
         System.out.print(S.nextToken()+" ");
       System.out.println();
      }}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class Main {

	public static void swap(int a,int b,int[]x)
	{
		int temp=x[a];
		x[a]=x[b];
		x[b]=temp;
	}
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader bf= new BufferedReader(new InputStreamReader(System.in));
		String res="";
		String s= bf.readLine();
		boolean c=false;
		for(int i=0;i<s.length();i++)
		{

			if(i+2<s.length() && s.charAt(i)=='W' && s.charAt(i+1)=='U' && s.charAt(i+2)=='B' )
			{
				i+=2;
				if(c==false)
				{
					if(res!=""){
						res+=" ";
						c=true;
					}
				}
			}
			else
			{

				res+= s.charAt(i);
				c=false;
			}
		}
//
//		for(int i=res.length()-1;i>=0;i--)
//		{
//			if(res.charAt(i)==' ')
//			{
//				res= res.substring(0, i);
//				break;
//			}
//		}
		System.out.println(res);
	}

}

import java.util.Scanner;
import java.lang.*;
public class Main{
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        String s=sc.nextLine();
        int x=s.length(),k=1;
        String S="";
        char ch;
        for(int i=0;i<x;i++){
            if(s.charAt(i)=='W' && i!=x-1 && s.charAt(i+1)=='U' && (i+1)!=x-1 && s.charAt(i+2)=='B'){
                i=i+2;
                if(k==0)
                    S=S+" ";
                k++;
            }
            else{
                ch=s.charAt(i);
                S=S+ch;
                k=0;
            }
        }
        System.out.println(S);
    }
}

import java.util.*;

public class Main  {
	public static void main(String[] args) {
		Scanner x = new Scanner(System.in);
		char[] y= (x.nextLine()).toCharArray();
		StringBuilder pal = new StringBuilder();
		int t= y.length;
		int i=0;
		int j;
		int z=0;
		while(i<t) {
			if (y[i]=='W'& (i+1)<y.length ) {

				if ((i+2)<y.length && y[i+1]=='U') {

					if (y[i+2]=='B' ) {
						i=i+3;
					} else{
						j=0;
						while (i<y.length) {
						if (y[i]=='W'& (i+1)<y.length ) {

							if (y[i+1]=='U'& (i+2)<y.length ) {

								if (y[i+2]=='B') {
									break;
								}

							}
						}
						pal.append(y[i]);
						j++;
						i++;
						}
						if (j!=0) {
							pal.append(" ");
							z=z+1;
							j=0;
						}

					}

				} else {
					j=0;
					while (i<y.length) {
					if (y[i]=='W'& (i+1)<y.length ) {

						if (y[i+1]=='U'& (i+2)<y.length ) {

							if (y[i+2]=='B') {
								break;
							}

						}
					}
					pal.append(y[i]);
					j++;
					i++;
					}
					if (j!=0) {
						pal.append(" ");
						z=z+1;
						j=0;
					}
				}

			}

			else {
				j=0;
				while (i<y.length) {
				if (y[i]=='W' && (i+1)<y.length ) {

					if (y[i+1]=='U' && (i+2)<y.length ) {

						if (y[i+2]=='B') {
							break;
						}

					}
				}
				pal.append(y[i]);
				j++;
				i++;
				}
				if (j!=0) {
					pal.append(" ");
					z=z+1;
					j=0;
				}
			}

		}

	       System.out.println(pal.toString().trim());
	}
}

import java.util.HashMap;
import java.util.Scanner;

public class Dubstep {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n = sc.next();
        System.out.println(n.replaceAll("(WUB)+", " ").trim());

    }
}

import java.util.Arrays;
import java.util.Scanner;
public class New {

    public static void main( String [] args)
    {
        Scanner sc = new Scanner(System.in);

        int i,j=0,begin=0, end=1, result=0, tempresult=0;
        String s=sc.next();

        boolean b=true;
        for(i=0; i<s.length(); i++)
        {
            if (i+3>s.length())
            {
                System.out.println(s.substring(i, s.length()));
                break;
            }
            else if (s.charAt(i)=='W' && s.charAt(i+1)=='U' && s.charAt(i+2)=='B')
            {
                i+=2;
                if (!b)
                {

                    System.out.print(' ');
                    b=true;

                }

            }
            else
            {
                System.out.printf("%c", s.charAt(i));
                b=false;
            }

        }
        System.out.println();

    }
}

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Scanner;

public class semianr8 {

	public static void main(String [] args){
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		String st = "";
		st = str.replaceAll("WUB", " ");
		System.out.println(st);
	}
}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

public class Dubstep {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }
}

class Task {
    public void solve(InputReader in, PrintWriter out) {

        String str = "";
        str=in.next();

        out.println(str.replace("WUB"," "));

    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class JavaApplication8 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader (isr);
        String cadena = br.readLine();
        String copia="";
        int pos;

        while (cadena.contains("WUB")){
              pos=cadena.indexOf("WUB");
              if (pos==0){
                  cadena=cadena.substring(3, cadena.length());
              }
              else{
                  copia+=cadena.substring(0, pos);
                  copia+=" ";
                  cadena=cadena.substring(pos, cadena.length());
              }
        }
        if (cadena.length()>0)
            copia+=cadena.substring(0, cadena.length());

        System.out.println(copia);
    }
}

import java.util.*;
import java.math.*;

public class mayn {

	public static void main(String[] args) {
		Scanner scan = new Scanner (System.in);
		String input = scan.nextLine();
		String pattern = "WUB";
		int len = input.length();
		boolean [] wub = new boolean [len];
		for (int i=0 ; i<len ; i++) {
			wub[i] = false;
		}
		for (int i=0 ; i < input.length()- 2 ; i++) {
			String x = "";
			for (int j=i ; j<i+3 ; j++) {
				x += input.charAt(j);
			}
			if (x.equals(pattern)) {
				wub[i] = true;
				wub[i+1] = true;
				wub[i+2] = true;
			}
		}
		String output = new String();
		for(int i=0 ; i<len ; i++) {
			if(!wub[i]) {
				output += input.charAt(i);
			} else {
				output += " ";
				while((i<len-1) && (wub[i+1])) {
					i++;
				}
			}
		}
		System.out.println(output);
	}
}

import java.util.Scanner;

public class Dubstep {
	public static void main(String[]args){
		Scanner  sc = new Scanner(System.in);
		String s = sc.next();
		String w = s;
		int count=0;
		int n=s.length();
		String out ="";
		int i;
		for(i = 0 ;i<=s.length()-3;i++){
			if(s.charAt(i)=='W'&&s.charAt(i+1)=='U'&&s.charAt(i+2)=='B')
				i+=2;
			else{
				out+=s.charAt(i);
				for(int j=i+1;i<s.length()-3;j++){
					if(s.charAt(j)=='W'&&s.charAt(j+1)=='U'&&s.charAt(j+2)=='B'){
						out+=' ';
						i+=3;
						break;
					}
					else
					{	out+=s.charAt(j);
					i++;
				}
				}

			}

		}
			System.out.println(out+s.substring(i, s.length()));
	}

}

import java.util.Scanner;

public class Main {
    private static final Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {
        String str=scanner.next();
        System.out.println(str.replaceAll("WUB", " ").trim());
    }
}

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
    static String s;
    boolean f=false;
	public static void main (String[] args) throws java.lang.Exception
	{
	    Scanner sc=new Scanner(System.in);
	    s=sc.next();
	    int c=0;
	    for(int i=0;i<s.length();i++){
	        if(i<=(s.length()-3)&&s.charAt(i)=='W'&&Codechef.check(i)){
	            //if(i>=3)
	            //System.out.println("i--"+i+"i-1---"+(s.charAt(i-1)!='B')+"i-2 "+(s.charAt(i-2)!='U')+"i-2"+(s.charAt(i-3)!='W'));

	            /*if(i>2&&!Codechef.check(i-3))
	                System.out.print(" ");
	           else if(i<=2)
	           System.out.print(" ");
	           */

	            i=i+2;

	        }else{
	            System.out.print(s.charAt(i));
	            if(i<=(s.length()-4)&&s.charAt(i+1)=='W'&&Codechef.check(i+1))
	            System.out.print(" ");
	        }

	    }
	}
	static boolean check(int i){
	    if(s.charAt(i)=='W'&&s.charAt(i+1)=='U'&&s.charAt(i+2)=='B'){

	   return true;
	   }
	   return false;
	}
}
/*
test case1
WUBWUBABCWUB

out--ABC
------------2
WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB
out-5
-------------3
2
1
2
1
2
ans-0
-------------
CWUBBWUBWUBWUBEWUBWUBWUBQWUBWUBWUB
out-C B E Q
WUBZVMJWUBWUBWUBFOIMJQWKNZUBOFOFYCCWUBWUBWUBAUWWUBRDRADWUBWUBWUBCHQVWUBWUBWUBKFTWUBWUBWUBW
out--
WUBJZGAEXFMFEWMAKGQLUWUBWUBWUBICYTPQWGENELVYWANKUOJYWUBWUBWUBGWUBWUBWUBHYCJVLPHTUPNEGKCDGQWUBWUBWUBOFWUBWUBWUBCPGSOGZBRPRPVJJEWUBWUBWUBDQBCWUBWUBWUBHWUBWUBWUBMHOHYBMATWUBWUBWUBVWUBWUBWUBSWUBWUBWUBKOWU
out---JZGAEXFMFEWMAKGQLU ICYTPQWGENELVYWANKUOJY G HYCJVLPHTUPNEGKCDGQ OF CPGSOGZBRPRPVJJE DQBC H MHOHYBMAT V S KOWU
*/

import java.util.*;

public class TestCodeforces {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String s = scanner.nextLine();

        String res = s.replaceAll("WUB", " ").trim();
        System.out.print(res);

        scanner.close();

    }

}

import java.util.*;
import java.io.*;

public class Main{
    public static void main(String[] args) throws IOException, StringIndexOutOfBoundsException{
        Reader rd = new Reader();
        String s = rd.next();
        String out = "";

        boolean init = false;
        for(int i=0; i<s.length(); i++){
            try{
                if(s.charAt(i)=='W' && s.charAt(i+1)=='U' && s.charAt(i+2)=='B'){
                i+=2;
                if(init){
                out+=" ";
                }
            }
            else{
                out+=s.charAt(i);
                init = true;
            }}
            catch(StringIndexOutOfBoundsException e){
                out+=s.charAt(i);
            }
        }

        System.out.println(out);

    }
}

/*Reader class*/
class Reader
{
    BufferedReader br;
    StringTokenizer tk;
    Reader() throws IOException
    {
        br=new BufferedReader(new InputStreamReader(System.in));
        tk=new StringTokenizer("");
    }
    public int nextInt() throws IOException
    {
        while(!tk.hasMoreTokens())
        {
            tk=new StringTokenizer(br.readLine().replaceAll("\r",""));
        }
        return Integer.parseInt(tk.nextToken());
    }
    public Float nextFloat() throws IOException
    {
        while(!tk.hasMoreTokens())
        {
            tk=new StringTokenizer(br.readLine().replaceAll("\r",""));
        }
        return Float.parseFloat(tk.nextToken());
    }
    public String next() throws IOException
    {
        return br.readLine();
    }
}

import javax.management.DynamicMBean;
import javax.xml.stream.events.DTD;
import java.util.*;

public class TestCodeforces {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();

        String res = s.replaceAll("WUB", " ");
        System.out.println(res.trim());

        scanner.close();
    }

    public static void print(boolean b) {
        if (b) System.out.println("YES");
        else System.out.println("NO");
    }

}

import java.lang.reflect.Array;
import java.util.* ;
public  class solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
       String s = sc.nextLine().replaceAll("WUB" , " ") ;
       System.out.print(s.trim()) ;
    }
}

import java.io.*;
import java.util.*;

public class solve {

    public static void main(String[] args) throws IOException {
        try {
            String s = next();
            String[] r = s.split("WUB");
            String ans = "";
            for(int i = 0; i < r.length; i++)
                if(r[i] != null && !r[i].equals("")) {
                    ans += r[i] + " ";
                }
            ans = ans.substring(0, ans.length() - 1);
            pw.println(ans);

        }
        finally {
            pw.close();
        }
    }

//  static Scanner sc = new Scanner(System.in);
    static PrintWriter pw = new PrintWriter (System.out);
    static StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
//  static BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
//  static StringTokenizer st ;
    static int nextInt() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }
    static long nextLong() throws IOException {
        in.nextToken();
        return (long) in.nval;
    }
    static double nextDouble() throws IOException {
        in.nextToken();
        return in.nval;
    }
    static String next() throws IOException {
        in.nextToken();
        return in.sval;
    }
}

import java.util.Scanner;

public class Dubstep {

    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        String x = in.nextLine();
        String dongato = "";
        int nu = x.length(), m = 0;
        for (int j = 0; j < nu - 2; j++) {
            if (x.substring(j, j + 3).equals("WUB")) {
                m = j;
                dongato += x.substring(0, j);
                j = nu;
            }
        }
        if (nu-m<3) {
            dongato=x;
        }
        for (int i = m; i < nu-2; i++) {
            if (i < nu - 3) {
                if (x.substring(i, i + 3).equals("WUB")) {
                    i = i + 2;
                    dongato = dongato.trim() + " ";
                    if (nu-(i+1)<3) {
                        dongato+=x.substring(i+1,nu);
                    }
                } else {
                    dongato += x.substring(i, i + 1);
                }
            }else{
                if (!x.substring(nu-3, nu).equals("WUB")){
                    dongato+=x.substring(nu-3, nu);
                }
            }
        }
        System.out.println(dongato.trim());
    }
}

import java.util.Scanner;

public class Temp {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String dubstep = in.nextLine();
        String original = "";
        boolean space = false;
        for(int i = 0; i < dubstep.length(); i++) {
            if(dubstep.charAt(i)=='W' && i+2<dubstep.length() && dubstep.substring(i, i+3).equals("WUB")) {
                i+=2;
                if(space) {original += " "; space = false;}
                continue;
            }
            original += dubstep.charAt(i);
            space = true;
        }
        System.out.println(original);
    }
}

import java.io.*;
import java.util.*;

import static java.lang.Integer.*;
import static java.lang.Math.*;
public class Code208A {

    public static void main(String[] args) throws Exception {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String ln = in.readLine().replaceAll("WUB", " ");
        String[]  x = ln.split("\\s+");
        for(int i=0, j = 0;i<x.length;++i){
            String y = x[i].replaceAll("\\s+", "");
            if(!y.isEmpty()){
                if(j>0)
                    System.out.print(" ");
                System.out.print(y);
                j++;
            }
        }
        System.out.println();
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import java.lang.Character;
import java.math.BigDecimal;
import java.math.BigInteger;

/**
 * Created by G.Gekko on 29.06.2014.
 */
public class Main {
    public static void main(String[] args) throws IOException {

        TaskA solver = new TaskA();
        solver.solve();

    }
}

class TaskA {
    public void solve() throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        String s = reader.readLine();

        boolean flag = false;
        boolean space = false;
        for (int i = 0; i < s.length(); i++) {
            if (i + 2 < s.length() && s.charAt(i) == 'W' && s.charAt(i+1) == 'U' && s.charAt(i+2) == 'B') {
                space = true;
                i += 2;
            } else {
                if (space && flag)
                    System.out.print(" ");
                System.out.print(s.charAt(i));
                space = false;
                flag = true;
            }
        }
    }

}

import java.util.*;

public class Main{

	public static void main(String args[]){

		String str;

		Scanner in = new Scanner(System.in);

		str = in.nextLine();

		String []s = str.split("WUB");

		for(String e : s)

			System.out.print(e + " ");

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class FindOriginal
{
    public static void main(String[] args)
    {
        String res = "";
        try {
            res = getString();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        res = FindOriginal.findOriginal(res);
        System.out.println(res);

    }

    private static String getString() throws IOException
    {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        String s = br.readLine();
        return s;

    }

    public static String findOriginal(String res)
    {

        res = res.replace("WUB", " ");
        do{
            res = res.replace("  ", " ");
        }while(res.contains("  "));

        return res.trim();
    }
}

import java.util.Scanner;

/**
 * Created by Baka on 04.05.2016.
 */
public class Dubstep {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] charArray = scanner.nextLine().toCharArray();

        StringBuilder stringBuilder = new StringBuilder();
        int wubs = 0;
        for (int i = 0; i < charArray.length; i++) {

            if (i < charArray.length - 2 && charArray[i] == 'W' && charArray[i + 1] == 'U' && charArray[i + 2] == 'B') {
                i += 2;
            } else {
                if (wubs != i - 1)
                    stringBuilder.append(' ');
                stringBuilder.append(charArray[i]);
                wubs = i;
            }
        }

        System.out.println(stringBuilder.toString().trim());
    }

}

import java.util.Scanner;

public class JavaApplication25 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String a = s.replaceAll("WUB", " ");
        boolean start=true;
        if (a.charAt(0) == ' ') {
            for (int i = 1; i < (a.length()-1); i++) {
                if (a.charAt(i)!= ' ') {
                    start=true;

                }
                     if (a.charAt(i) == ' ' && a.charAt(i + 1) == ' '&& start==false) {
                    } else {
                        System.out.print(a.charAt(i));
                    }
                }
        }
         else {
            for (int i = 0; i < a.length()-1; i++) {
                if (a.charAt(i) == ' ' && a.charAt(i + 1) == ' ') {
                } else {
                    System.out.print(a.charAt(i));

                }
            }

        }
        char r=a.charAt(a.length()-1);
        System.out.print(r);
    }
}

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        //String array[] = s.split("");
        boolean wub = true;

        ArrayList<Character> arrayList =new ArrayList<>();
        if(s.length()<=2){
            System.out.println(s);
        }else {

            for (int i = 0; i < s.length() - 2; i++) {
                if (s.substring(i, i + 3).equals("WUB")) {
                    String r = s.substring(i, i + 3);
                    s = s.replace("WUB", "112");

                }

            }
            for (int i = 0; i < s.length(); i++) {
                if (s.charAt(i) != '1') {
                    arrayList.add(s.charAt(i));
                }

            }
            for (int i = 0; i < arrayList.size(); i++) {
                if (arrayList.get(i) == '2') {
                    arrayList.set(i, ' ');
                }

            }

            for (int i = 0; i < arrayList.size(); i++) {
                System.out.print(arrayList.get(i));

            }
        }

    }

}

//package com.company;

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String s = input.nextLine();
        System.out.println(s.replace("WUB"," "));

    }
}

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String[] s = in.nextLine().split("WUB");
        //WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB

        for (String token: s) {
            System.out.print(token + " ");
        }
    }
}

import java.io.BufferedInputStream;
import java.util.Arrays;
import java.util.Scanner;

public class C208A {

	public void solve() throws Exception {
		String s = nextWord();
		Scanner sc = new Scanner(s);
		sc.useDelimiter("WUB");
		while (sc.hasNext()) {
			String q = sc.next();
			if (q.length() > 0) {
				print(q);
				print(" ");
			}
		}
	}

	// ------------------------------------------------------

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}

	void print(Object... os) {
		if (os != null && os.length > 0)
			System.out.print(os[0].toString());
		for (int i = 1; i < os.length; ++i)
			System.out.print(" " + os[i].toString());
	}

	void println(Object... os) {
		print(os);
		System.out.println();
	}

	BufferedInputStream bis = new BufferedInputStream(System.in);

	String nextWord() throws Exception {
		char c = (char) bis.read();
		while (c <= ' ')
			c = (char) bis.read();
		StringBuilder sb = new StringBuilder();
		while (c > ' ') {
			sb.append(c);
			c = (char) bis.read();
		}
		return new String(sb);
	}

	String nextLine() throws Exception {
		char c = (char) bis.read();
		while (c <= ' ')
			c = (char) bis.read();
		StringBuilder sb = new StringBuilder();
		while (c != '\n' && c != '\r') {
			sb.append(c);
			c = (char) bis.read();
		}
		return new String(sb);
	}

	int nextInt() throws Exception {
		return Integer.parseInt(nextWord());
	}

	long nextLong() throws Exception {
		return Long.parseLong(nextWord());
	}

	public static void main(String[] args) throws Exception {
		new C208A().solve();
	}
}

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        //WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB
        String result = "";
        boolean isSong = false;
        for (int i = 0; i < s.length(); i++) {
            String token = "";
            if (i + 2 < s.length()) {
                token = s.substring(i, i + 3);
            }
            if (token.equals("WUB")) {
                if (isSong) result += " ";
                i += 2;
            } else {
                result += s.charAt(i);
                isSong = true;
            }
        }

        System.out.println(result);

    }
}

import java.util.Scanner;
public class Dubstep {
    static String dub(String s){
        int l=s.length();
        char[] ch= s.toCharArray();
        String a= "WUB";
        char[] f= a.toCharArray();
        int  d=a.length();
      int m=0,n=0,x=0,z=0,o=0;
      for(int j=0;j<l;j++)
      {
          if(ch[j]==f[m])
          {
              m++;
              z++;
          }
          else if(ch[j]==f[0])
          {
              m=0;
              m++;
              z=0;
              z++;
          }
          else
          {
              m=0;
              z=0;
          }
          if(z==d)
          {
              ch[j]=' ';
              ch[j-1]=' ';
              ch[j-2]=' ';
              n++;
              m=0;
              z=0;
          }
      }
      String s2=String.valueOf(ch);
      return s2;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        System.out.print(dub(s));
    }
}

import java.util.*;

public class Main {
	public static Scanner scan = new Scanner(System.in);
	//to reverse number

	public static void main(String[] args) {
	String x =scan.next();
	String res ="";
	for (int  i =0 ;i< x.length();i++)
	{

		if(i+1<x.length() && i+2 <x.length())
		{
		if(x.charAt(i)=='W'&& x.charAt(i+1)=='U'&&x.charAt(i+2)=='B')
		{
			i=i+2;
			res+=" ";
			continue;
		}
		}

			res+=""+x.charAt(i);

	}

	System.out.println(res);
	}
}

import java.util.Scanner;

/**
 * Created by Ferrumit on 6/13/2016.
 */
public class _208A {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        String s = in.next();

        s = s.replaceAll("(WUB)+"," ").replaceAll("^\\s|\\s$","");

        System.out.println(s);

    }
}

import java.util.Scanner;

public class StringCut {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.nextLine();
        String t = " ";
        a = a.replaceAll("WUB", t);
        for (int i = 0; i < a.length(); i++) {
            if (a.substring(i, i + 1).equals(" "))
                for (int j = i + 1; j < a.length(); j++) {
                    if (a.substring(j, j + 1).equals(" ")) {
                        // System.out.println("HERE");
                        t += " ";
                    } else
                        break;
                }
            a = a.replaceAll(t, " ");
        }
        a = a.substring(0, 1).equals(" ") ? a.substring(1, a.length()) : a;
        a = a.substring(a.length() - 1, a.length()).equals(" ") ? a.substring(
                0, a.length() - 1) : a;
        System.out.println(a);

    }

}

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String string =  scan.next();
        String temp = string.replace("WUB"," ").trim();
        String s="";
        for(int i=0;i<temp.length();i++){
            s+=temp.charAt(i);
            if(temp.charAt(i)==' ' && i<temp.length()-1 && temp.charAt(i+1)==' ')
                i++;
        }
        System.out.println(s);
    }
}

import java.util.*;
public class Solution {

	public static void main(String[] args)
	{
		Scanner s= new Scanner(System.in);
		String str=s.nextLine();
		int n=str.length();
		int itr=0;
		int flag=0;
		char[] c=str.toCharArray();
		for(int i=0;i<n;)
		{
			if(flag==0 && i<(n-2) && c[i]=='W' && c[i+1]=='U' && c[i+2]=='B')
			{
				i=i+3;
			}
			else if(flag==1 && i<(n-2) && c[i]=='W' && c[i+1]=='U' && c[i+2]=='B')
			{
				i=i+3;
				System.out.print(' ');
				flag=0;
			}
			else
			{
				System.out.print(c[i]);
				flag=1;
				i++;

			}
		}
		s.close();
		// TODO Auto-generated method stub

	}

}

import java.io.*;
import java.util.*;

public class Watermelon
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);

		int t = 1;//sc.nextInt();

		while(t-->0)
		{
			String s = "WUB" + sc.next() + "WUB";
			int n = s.length();
			String ans = "";

			for(int i=0; i<n-2; i++)
			{
				if(s.charAt(i)=='W' && s.charAt(i+1)=='U' && s.charAt(i+2)=='B')
				{
					ans += " ";
					i+=2;
				}
				else
				{
					ans += s.charAt(i);
				}
			}

			int index = 0;
			n = ans.length();

			while(true)
			{
				if(ans.charAt(index)==' ')
					index++;
				else
					break;
			}

			while(true)
			{
				if(ans.charAt(n-1)==' ')
					n--;
				else
					break;
			}

			boolean flag = true;

			for(int i=index; i<n; i++)
			{
				if(ans.charAt(i)!=' ')
				{
					System.out.print(ans.charAt(i));
					flag = false;
				}
				else if(flag==false)
				{
					System.out.print(" ");
					flag = true;
				}
			}
		}
	}
}

import java.util.*;
import java.io.IOException;
public class dubstep {
    public static void main (String[] args) throws IOException{
        Scanner in = new Scanner(System.in);
        String[] a = in.next().split("WUB");
        for(int i=0;i<a.length;i++)
        {
            System.out.println(a[i]+" ");
        }
    }
}

import java.util.Scanner;

public class A208_WUB {

	public static void main(String[] args) {
		String s = new Scanner(System.in).next();
		System.out.println(s.replace("WUB", " ").trim());
	}
}

import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeMap;
import java.util.TreeSet;

public class JavaApplication2 {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        String x = in.next();
        System.out.println((x.replaceAll("WUB", " ")).trim().replaceAll("  "," "));

    }

}

/*package whatever //do not write package name here */

import java.io.*;
import java.util.Scanner;

public class GFG {
	public static void main (String[] args) {
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		String n="";
		int l=s.length();
		int i=0;

		for(i=0;i<l;i++)
		{
		    if(i<=l-3)
		    {
		  if(s.charAt(i)=='W' && s.charAt(i+1)=='U' && s.charAt(i+2)=='B')
		  {
		      i=i+2;

		  }

		  else
		  {

		      n=n+s.charAt(i);

		      if(i<=l-4)
		      {
		          if(s.charAt(i+1)=='W' && s.charAt(i+2)=='U' && s.charAt(i+3)=='B')
		      n=n+" ";
		      }
		  }
		    }

		    else
		    break;
		}
	if(i==l-2)
	n=n+s.charAt(l-2)+s.charAt(l-1);
	if(i==l-1)
	n=n+s.charAt(l-1);
	System.out.println(n);
	}
}

import java.util.Scanner;

public class Problem208A
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);

		String str = scan.next();
		StringBuffer buf = new StringBuffer("");
		String[] arr = str.split("WUB");

		for(String s : arr)
		{
			if(!s.equals(""))
			{
				buf.append(s).append(" ");
			}
		}

		for(int i = 0; i<buf.toString().length()-1; i++)
		System.out.print(buf.toString().charAt(i));

	}
}

import java.util.*;
public class p81 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		String s = in.next();
		String x = "WUB"; String ans = ""; String s1="";
		for (int i = 0; i < s.length(); i++) {
			if(i+3<=s.length()) {
				s1 =s.substring(i, i+3);
			}else if(i+3<=2) {
				s1 =s.substring(i, i+2);
			}else {
				s1 =s.substring(i, i+1);
			}
			if (s1.equals(x)) {
				i+=2;
				if(!ans.equals("")&&!ans.endsWith(" ")) {
					ans+=" ";
				}
			}else {
				ans+=s.charAt(i);
			}

		}
		System.out.println(ans);
	}

}

import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class A_208 {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		String str = sc.next().replaceAll("WUB", " ").replaceAll("\\s+", " ");

		System.out.println(str.indexOf(' ') == 0 ? str.substring(1) : str);
	}

}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
import java.util.*;
/**
 *
 * @author Hai
 */
public class A208 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        String result = "";
        int mark = 0;
        for(int i=0;i<s.length();i++){
            if(i<s.length()-2&&s.charAt(i)=='W'&&s.charAt(i+1)=='U'&&s.charAt(i+2)=='B'){
                i+=2;
                mark =1;
                continue;
            }
            if(mark == 1)
                result += " ";
            result += s.charAt(i);
            mark = 0;
        }
        if(result.charAt(0)==' ')
            result = result.substring(1, result.length());
        System.out.println(result);
    }
}

import java.util.*;
public class Dubstep {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner scan = new Scanner(System.in);
        String k1 = scan.next();
        StringBuilder k2 = new StringBuilder();
        int ptr = 0;
        boolean space = false;
        ArrayList<String> k3 = new ArrayList();
        while (true){
            if (ptr>=k1.length()){
                break;
            }
            if (k1.length()-ptr<3){
                k2.append(k1.substring(ptr, k1.length()));
                break;
            }
            if (k1.charAt(ptr)=='W'
                    &&k1.charAt(ptr+1)=='U'
                    &&k1.charAt(ptr+2)=='B'){
                ptr+=3;
                k3.add(k2.toString());
                k2 = new StringBuilder();
            }
            else {
                k2.append(k1.charAt(ptr));
                ptr++;
            }
        }
        k3.add(k2.toString());
        for (String e: k3){
            if (!e.equals("")){
                System.out.print(e+" ");
            }
        }
        System.out.println();
    }

}

import java.util.*;

public class first {
    static int as[];
    public static void main(String args[]){
        Scanner in=new Scanner(System.in);
        String str = in.nextLine();
        String ans="";
        String k = "WUB";
        boolean f=false;
        while(!str.isEmpty()){
            if(str.length()<3){
                ans+=str;
                break;
            }
            if(str.substring(0,3).equals(k)){
                if(f){
                    ans+=" ";
                    f=false;
                }
                str = str.substring(3);
            }else{
                f = true;
                ans+=str.charAt(0);
                str = str.substring(1);
            }
        }
        System.out.println(ans);
    }
}

import java.io.*;

public class A208
{

public static void main(String args[])
{
InputStreamReader ir=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(ir);
String s="";
try
{
s=br.readLine();

}

catch(IOException e)
{
System.out.println(" ");
}

String t="WUB";
String temp="";
int count=0,len=s.length();

for(int i=0;i<len;i++)
{
if(s.charAt(i)=='W')
{
  if(i<=(len-3) && s.substring(i,i+3).equals(t) )
     {
       i=i+2;
       count++;
     }
  else
     {   count=0;
         temp=temp+s.charAt(i);
     }
}
else
{
count=0;
temp=temp+s.charAt(i);
}
if(count==1)
{
temp=temp+" ";
}
}
System.out.println(temp.trim());
}
}

import java.io.*;
public class dubstep
{
 public static void main(String args[])
 {
  InputStreamReader ir=new InputStreamReader(System.in);
  BufferedReader br=new BufferedReader(ir);
  String s,t;
  s=t=new String();
  try
  {
   s=br.readLine();
  }
  catch(IOException e)
  {
  System.out.println(" ");
  }
  int l=s.length();
  for(int i=0;i<l;i++)
  {
   if(s.charAt(i)=='W')
   {
    if(i<=(l-3) && s.substring(i,i+3).equals("WUB") )
    {
       i=i+2;
       t+=" ";
    }
    else
    t+=s.charAt(i);
   }
   else
   t+=s.charAt(i);
  }
  System.out.print(t);
 }
}

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Dubstep
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        String ss[] = s.split("WUB");
        for(int i = 0;i<ss.length;i++)
        {
            System.out.print(ss[i]+" ");
        }
    }
}

import java.io.*;
import java.util.*;
import java.lang.Math.*;
public class A130A
{
     public static void main(String args[])throws Exception
     {
         BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
         PrintWriter pw = new PrintWriter(System.out);
         String s=br.readLine();

         String str[]=s.split("WUB");
         int l=str.length;
         s="";
         for(int i=0;i<l;i++)
         {
             s+=str[i]+" ";
            }
        System.out.println(s.trim());
    }

    }

import java.util.Scanner;

public class CF_208A {
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        String word = input.next();
        StringBuilder str = new StringBuilder();
        int start=0;
        int ind=word.indexOf("WUB", start);
        while (ind>-1){
            if (ind!=start) str.append(" " + word.substring(start, ind));
            start=ind+3;
            ind=word.indexOf("WUB", start);
        }
        if (start<word.length()) str.append(" " + word.substring(start, word.length()));
        if (str.length()>0) str.deleteCharAt(0);
        System.out.println(str.toString());
    }
}

import java.util.*;
public class osama {
    public static void main(String[] args) {
        String X ;
        Scanner sc = new Scanner(System.in );
        X=sc.next();
        boolean flag = false  ; int index = 0 ; int  i = 0 ;
        while(i+1<X.length()&&i+2<X.length()&&X.charAt(i)=='W'&&X.charAt(i+1)=='U'&&X.charAt(i+2)=='B')
        {
            i+=3;
        }
        index = i ;
        for( i  =index ; i < X.length() ; i ++)
        {
            if(i+1<X.length()&&i+2<X.length()&&X.charAt(i)=='W'&&X.charAt(i+1)=='U'&&X.charAt(i+2)=='B')
                {
                    i+=2;
                    if(!flag)
                    {
                        flag = true ;
                        System.out.print(" ");
                    }
                }
            else
            {
                System.out.print(X.charAt(i));
                flag = false ;
            }

        }

    }
}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Sergey Parkhomenko
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }
}

class TaskA {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        StringBuffer s=new StringBuffer(in.next());
        boolean flag=true;
        for (int i=0;i<s.length();i++)
            if (i+2<s.length())   {//out.println("test1");
                if (s.substring(i,i+3).toString().equals("WUB")) {     //out.println("test1");
                    s.delete(i,i+3); s.insert(i," ");                        }

            }
        out.println(s);
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong(){
        return Long.parseLong(next());

    }

    public double nextDouble(){
        return Double.parseDouble(next());
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class CodeChef {

	public static void main(String[] args) throws IOException,NumberFormatException{
		try {
		   FastScanner sc=new FastScanner();
		   String n=sc.next();
		   String s=n.replaceAll("WUB"," ");
		   System.out.println(s.trim());
		}
		catch(Exception e) {
			return ;
		}

	}
	public static boolean check(int n) {
		boolean ans=false;
		if(n==0) {
			return true;
		}
		while(n!=0) {
			int temp=n%10;
			if(temp==0) {
				ans=true;
				break;
			}
			n=n/10;
		}

		return ans;
	}

	public static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
                                      st=new StringTokenizer(br.readLine());
                              } catch (IOException e) {}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}

	}
}

import java.util.Scanner;

public class Problem208A {
	public static void main(String[] args) throws Exception {
		Scanner scanner = new Scanner(System.in);
		String line = scanner.next();
		System.out.println(line.replaceAll("WUB", " ").trim().replaceAll("  ", " "));
	}

}

import java.util.Scanner;
public class NewClass55 {
    public static void main(String[] args) {

       Scanner input = new Scanner (System.in);

       String a = input.next();

        String[] s = a.split("WUB");

        for (int i = 0; i < s.length; i++) {

                System.out.print(s[i]+" ");

        }

    }
}

import java.util.ArrayList;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * User: Саша
 * Date: 11.08.12
 * Time: 11:31
 */
public class Dubstep {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        ArrayList<String> array = new MyStringTokenizer().f(scanner.next(), "WUB");
        for (int i = 0; i < array.size(); i++) {
            System.out.print((i != array.size() - 1) ? array.get(i) + " " : array.get(i));
        }
    }
}

class MyStringTokenizer {
    public final ArrayList<String> f(String s, String space) {
        String s2 = "";
        int space_char_number = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == space.charAt(space_char_number)) {
                space_char_number++;
            } else {
                space_char_number = 0;
                if(s.charAt(i) == space.charAt(0))
                    space_char_number++;
            }
            //System.out.print("SCN = " + space_char_number + ";  ");

            if (i < s.length())
                s2 += "" + s.charAt(i);

            //System.out.print("s2 = " + s2 + "; ");

            if (space_char_number == space.length()) {
                s2 = s2.substring(0, s2.length() - space.length());
                if (s2.length() > 0) array.add(s2);
                s2 = "";
                space_char_number = 0;
            }

            if (i == s.length() - 1) {
                if (s2.length() > 0) array.add(s2);
            }

            //System.out.print("s2 = " + s2 + "; ");
            //System.out.println();
        }

        return array;
    }

    private ArrayList<String> array = new ArrayList<String>();
}

import java.util.Scanner;

public class Dubstep {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n=sc.nextLine(),ff="";
        String nn=n.replaceAll("WUB", " ");
        String nnn[] = nn.split(" +");
        for (String j : nnn) {
            ff += j + " ";
        }
        System.out.println(ff.trim());
    }
}

import java.util.*;
public class a
{
    public static void main(String[] args)
    {
        Scanner input = new Scanner(System.in);
        String s = input.next();
        while(s.contains("WUB"))
        {
            int i = s.indexOf("WUB");
            if(i == 0)
                s = s.substring(3);
            else
            {
                System.out.print(s.substring(0, i) + " ");
                s = s.substring(i+3);
            }
        }
        System.out.println(s);
    }
}

import java.util.Scanner;

public class C_208A {
   public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	String s = sc.nextLine();
	String p[] = s.replaceAll("WUB"," ").split(" ");
	for (int i = 0; i < p.length; i++) {
		System.out.print(p[i].equals("")?"":(p[i]+" "));
	}
}
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Vector;

public class NewClass {

	static Vector v5=new Vector();
	static Vector v6=new Vector();
	static long n;
	static boolean a[]=new boolean[100000000];
	/**
	 * *******************************************Constants*****************************************
	 */
	static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
	static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static long mod=(long) 1e9+7;
	static long mod1=998244353;
	static boolean sieve[];
	static ArrayList<Integer> primes;
	static ArrayList<Long> factorial;
	static HashSet<Integer> graph[];

	/**
	 * **************************************Solutions
	 * Begins**************************************************
	 */

	public static void main(String[] args) {
		Scanner ob=new Scanner(System.in);
		String s=ob.next();
		Vector v=new Vector();
		Vector v1=new Vector();
		for (int i=0; i<s.length(); i++) {
			v.add(s.charAt(i));
		}
		v.add('0');
		v.add('0');
		v.add('0');
		v.add('0');
		v.add('0');
		v.add('0');
		v.add('0');
		v.add('0');

		out:for (int i=0; i<v.size()-3;) {
			if((char)v.get(i)=='0'&&(char)v.get(i+1)=='0'&&(char)v.get(i+2)=='0'){break;}
			if ((char)v.get(i)=='W'&&(char )v.get(i+1)=='U'&&(char)v.get(i+2)=='B') {
				i+=3;
				v1.add(" ");
				continue out;
			}
			else {
				v1.add(v.get(i));
				i++;
			}
		}

		//  1st er  space gulo skip kore gelam
		int k=0;
		while(v1.get(k)==" "){k++;}
		for(;k<v1.size();k++){System.out.print(v1.get(k));}
	}

	/**
	 * **************************************Template
	 * Begins**************************************************
	 */
	/**
	 * *************************************Precision
	 * Printing***********************************************
	 */
	static void printPrecision(double d) {
		DecimalFormat ft=new DecimalFormat("0.000000");
		out.println(ft.format(d));
	}

	/**
	 * ****************************************Graph**********************************************************
	 */
	/*  static void Makegraph(int n){
        graph=new HashSet[n];
        for(int i=0;i<n;i++){
            graph[i]=new HashSet<>();
        }
    }*/
	static void addEdge(int a, int b) {
		graph[a].add(b);
	}

	/**
	 * *****************************************TRIPLET*******************************************************
	 */
	static class tripletComparator implements Comparator<triplet> {

		public int compare(triplet p1, triplet p2) {
			if (p1.u<p2.u) {
				return 1;
			}
			else if (p1.u>p2.u) {
				return -1;
			}
			else {
				return 0;
			}
		}
	}

	static class triplet {

		int u;
		int v;
		int i;

		public triplet(int u, int v, int i) {
			this.u=u;
			this.v=v;
			this.i=i;
		}

		public String toString() {
			return "[u="+u+", v="+v+", i="+i+"]";
		}
	}

	/**
	 * *******************************************PAIR*********************************************************
	 */
	static class PairComp implements Comparator<Pair> {

		public int compare(Pair p1, Pair p2) {
			if (p1.u>p2.u) {
				return 1;
			}
			else if (p1.u<p2.u) {
				return -1;
			}
			else {
				return p1.v-p2.v;
			}
		}
	}

	static class Pair implements Comparable<Pair> {

		int u;
		int v;
		int index=-1;

		public Pair(int u, int v) {
			this.u=u;
			this.v=v;
		}

		public int hashCode() {
			int hu=(int) (u^(u>>>32));
			int hv=(int) (v^(v>>>32));
			return 31*hu+hv;
		}

		public boolean equals(Object o) {
			Pair other=(Pair) o;
			return u==other.u&&v==other.v;
		}

		public int compareTo(Pair other) {
			if (index!=other.index) {
				return Long.compare(index, other.index);
			}
			return Long.compare(v, other.v)!=0?Long.compare(v, other.v):Long.compare(u, other.u);
		}

		public String toString() {
			return "[u="+u+", v="+v+"]";
		}
	}

	/**
	 * *****************************************LONG
	 * PAIR*****************************************************
	 */
	static class PairCompL implements Comparator<Pairl> {

		public int compare(Pairl p1, Pairl p2) {
			if (p1.u>p2.u) {
				return 1;
			}
			else if (p1.u<p2.u) {
				return -1;
			}
			else {
				return 0;
			}
		}
	}

	static class Pairl implements Comparable<Pair> {

		long u;
		long v;
		int index=-1;

		public Pairl(long u, long v) {
			this.u=u;
			this.v=v;
		}

		public int hashCode() {
			int hu=(int) (u^(u>>>32));
			int hv=(int) (v^(v>>>32));
			return 31*hu+hv;
		}

		public boolean equals(Object o) {
			Pair other=(Pair) o;
			return u==other.u&&v==other.v;
		}

		public int compareTo(Pair other) {
			if (index!=other.index) {
				return Long.compare(index, other.index);
			}
			return Long.compare(v, other.v)!=0?Long.compare(v, other.v):Long.compare(u, other.u);
		}

		public String toString() {
			return "[u="+u+", v="+v+"]";
		}
	}

	/**
	 * ***************************************DEBUG**********************************************************
	 */
	public static void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	/**
	 * ***************************************NUMBER
	 * THEORY***************************************************
	 */
	/**
	 * **********************************MODULAR
	 * EXPONENTIATION**********************************************
	 */
	static long modulo(long a, long b, long c) {
		long x=1;
		long y=a;
		while (b>0) {
			if (b%2==1) {
				x=(x*y)%c;
			}
			y=(y*y)%c; // squaring the base
			b/=2;
		}
		return x%c;
	}

	/**
	 * ******************************************GCD*********************************************************
	 */
	static long gcd(long x, long y) {
		if (x==0) {
			return y;
		}
		if (y==0) {
			return x;
		}
		long r=0, a, b;
		a=(x>y)?x:y; // a is greater number
		b=(x<y)?x:y; // b is smaller number
		r=b;
		while (a%b!=0) {
			r=a%b;
			a=b;
			b=r;
		}
		return r;
	}

	/**
	 * ****************************************SIEVE*********************************************************
	 */
	static void sieveMake(int n) {
		sieve=new boolean[n];
		Arrays.fill(sieve, true);
		sieve[0]=false;
		sieve[1]=false;
		for (int i=2; i*i<n; i++) {
			if (sieve[i]) {
				for (int j=i*i; j<n; j+=i) {
					sieve[j]=false;
				}
			}
		}
		primes=new ArrayList<Integer>();
		for (int i=0; i<n; i++) {
			if (sieve[i]) {
				primes.add(i);
			}
		}
	}

	/**
	 * *************************************FACTORIAL********************************************************
	 */
	static void fact(int n) {
		factorial=new ArrayList<>();
		factorial.add((long) 1);
		for (int i=1; i<=n; i++) {
			factorial.add((factorial.get(i-1)*i)%mod);
		}
	}

	/**
	 * *****************************************ncr********************************************************
	 */
	static long ncr(int n, int k) {
		long aa=modulo(factorial.get(n-k), mod-2, mod);
		long bb=modulo(factorial.get(k), mod-2, mod);
		long cc=factorial.get(n);
		long ans=(aa*cc)%mod;
		ans=(ans*bb)%mod;
		return ans;
	}

	/**
	 * *************************************STRING
	 * REVERSE***************************************************
	 */
	static String reverse(String str) {
		char r[]=new char[str.length()];
		int j=0;
		for (int i=str.length()-1; i>=0; i--) {
			r[j]=str.charAt(i);
			j++;
		}
		return new String(r);
	}
	static void seive(int n) {
		for (int i=2; i<=n; i+=2) {
			if (a[i]==false) {
				a[i]=true;
			}
		}
		for (int i=3; i*i<=n; i+=2) {
			if (a[i]==false) {
				for (int j=i*i; j<=n; j+=i) {
					a[j]=true;
				}
			}
		}
		v5.add(2);
		for (int i=3; i<=n; i++) {
			if (a[i]==false) {
				v5.add(i);
			}
		}
	}

	static void primefactorization(int n) {
		int i=0;
		while (n!=1) {
			if (n%(int) v5.get(i)==0) {
				while (n%(int) v5.get(i)==0) {
					n=n/(int) v5.get(i);
					v6.add(v5.get(i));
				}
			}
			i++;
		}
	}
}
/**
 * ******************************************End**********************************************************
 */

public class Main{
  public static void main(String[] args){
    java.util.Scanner kb = new java.util.Scanner(System.in);
    String k = kb.next();
    k = k.replaceAll("WUB"," ");
    System.out.println(k.trim());
  }
}

import java.util.Arrays;
import java.util.Scanner;
import java.util.Vector;

public class NewClass {

	/*static Vector v5=new Vector();
	static Vector v6=new Vector();
	static long n;
	static boolean a[]=new boolean[100000000];
	static void seive(int n) {
		for (int i=2; i<=n; i+=2) {
			if (a[i]==false) {
				a[i]=true;
			}
		}
		for (int i=3; i*i<=n; i+=2) {
			if (a[i]==false) {
				for (int j=i*i; j<=n; j+=i) {
					a[j]=true;
				}
			}
		}
		v5.add(2);
		for (int i=3; i<=n; i++) {
			if (a[i]==false) {
				v5.add(i);
			}
		}
	}

	static void primefactorization(int n) {
		int i=0;
		while (n!=1) {
			if (n%(int) v5.get(i)==0) {
				while (n%(int) v5.get(i)==0) {
					n=n/(int) v5.get(i);
					v6.add(v5.get(i));
				}
			}
			i++;
		}
	}*/

	public static void main(String[] args) {
		Scanner ob=new Scanner(System.in);
		String s=ob.next();
		Vector v=new Vector();
		Vector v1=new Vector();
		for (int i=0; i<s.length(); i++) {
			v.add(s.charAt(i));
		}
		v.add('0');
		v.add('0');
		v.add('0');
		v.add('0');
		v.add('0');
		v.add('0');
		v.add('0');
		v.add('0');

		out:for (int i=0; i<v.size()-3;) {
			if((char)v.get(i)=='0'&&(char)v.get(i+1)=='0'&&(char)v.get(i+2)=='0'){break;}
			if ((char)v.get(i)=='W'&&(char )v.get(i+1)=='U'&&(char)v.get(i+2)=='B') {
				i+=3;
				v1.add(" ");
				continue out;
			}
			else {
				v1.add(v.get(i));
				i++;
			}
		}

		//  1st er  space gulo skip kore gelam
		int k=0;
		while(v1.get(k)==" "){k++;}
		for(;k<v1.size();k++){System.out.print(v1.get(k));}
	}
}

import java.util.*;

public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String input = sc.next();
        String out = "";

        for (int i = 0; i < input.length(); i++) {

            if (i - (input.length() - 1) == 0 && input.charAt(i) == 'W' || i - (input.length() - 2) == 0 && input.charAt(i) == 'W') {
                out += input.charAt(i);
            } else if (input.charAt(i) == 'W' && input.charAt(i + 1) == 'U' && input.charAt(i + 2) == 'B') {
                i += 2;
            } else if (i - (input.length() - 2) == 0 || i - (input.length() - 1) == 0 || i - input.length() == 0 || i - (input.length() - 3) == 0) {
                out += input.charAt(i);
            } else if (input.charAt(i + 1) == 'W' && input.charAt(i + 2) == 'U' && input.charAt(i + 3) == 'B') {
                out += input.charAt(i) + " ";
            } else if (true) {
                out += input.charAt(i);
            }
        }

        System.out.println(out);
    }
}

import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
	public void solve(int testNumber, InputReader in, OutputWriter out) {
        boolean flag = false;
        String str = in.readLine();
        String res = str.replaceAll("WUB", "?");
        String[] ss = res.split("[\\?]");
        for (String s : ss) {
            if (s.length() == 0)
                continue;
            if (flag)
                out.print(" " + s);
            else {
                flag = true;
                out.print(s);
            }
        }
        out.printLine();
	}
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            }
            catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    private String readLine0() {
        StringBuffer buf = new StringBuffer();
        int c = read();
        while (c != '\n' && c != -1) {
            if (c != '\r')
                buf.appendCodePoint(c);
            c = read();
        }
        return buf.toString();
    }

    public String readLine() {
        String s = readLine0();
        while (s.trim().length() == 0)
            s = readLine0();
        return s;
    }

    }

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object...objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

    }

import java.io.*;
import java.util.*;

public class Main{

    static BufferedReader input;
    static StringTokenizer _stk;

    static String readln() throws IOException {
        String l = input.readLine();
        if (l != null) {
            _stk = new StringTokenizer(l, " ");
        }
        return l;
    }

    static String next() {
        return _stk.nextToken();
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        input = new BufferedReader(new InputStreamReader(System.in));

        String linea = input.readLine();
        linea = linea.replace("WUB", " ");
        _stk = new StringTokenizer(linea, " ");
        int cuantas = _stk.countTokens();
        for (int i = 1; i <= cuantas; i++) {
            if (i == cuantas) {
                System.out.print(next());
            } else {
                System.out.print(next() + " ");
            }
        }

    }
}

import java.io.*;

public class Main {
  public static void main(String[] args) throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String song = br.readLine().trim().replace("WUB", "#");
    String[] more = song.split("#");
    song = "";
    for (String z :
            more) {
      if(!z.isEmpty())
        song = song + z + " ";
    }
    System.out.println(song.trim());
  }
}

import java.io.*;
import java.util.*;

public class dubstep {
	public static void main(String args[]) {
		ArrayList<Integer> al = new ArrayList<Integer>();
		// System.out.println("enter");
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String str = "";
		int index = s.indexOf("WUB");
		int last_index = s.lastIndexOf("WUB");
		if (index == -1) {
			System.out.println(s);
			System.exit(0);
		}
		al.add(index);
		if (index != 0)
			str += s.substring(0, index) + " ";
		while (index != last_index) {
			index = s.indexOf("WUB", index + 3);
			al.add(index);
		}
		// al.add(index);
		for (int i = 0; i < al.size() - 1; i++) {
			int start_index = al.get(i);
			int end_index = al.get(i + 1);
			if (start_index + 3 == end_index)
				continue;
			str += s.substring(start_index + 3, end_index) + " ";
		}
		if (al.get(al.size() - 1) + 3 <= s.length() - 1)
			str += s.substring(al.get(al.size() - 1) + 3);

		System.out.println(str.trim());
	}
}

import java.util.Scanner;

public class songs {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
 Scanner in = new Scanner(System.in);
 String S = in.nextLine();
 String result = "";
 for(int i=0;i<S.length();i++){
	 char c=S.charAt(i);
	 if(i<=S.length()-3&&c=='W'&&S.charAt(i+1)=='U'&&S.charAt(i+2)=='B'){
				i=i+2;
	 }else {

		 if(i<S.length()-3&&S.charAt(i+1)=='W'&&S.charAt(i+2)=='U'&&S.charAt(i+3)=='B'){
			 result=result+c+" ";
		 }else {
			 result=result+c;
		 }
	 }
 }System.out.println(result);
	}
}

import java.util.*;
import java.io.*;

import static java.lang.Math.*;
import static java.lang.System.exit;

public class Program<j> {
    public static void main(String[] args) throws IOException {
        BufferedReader b = new BufferedReader(new InputStreamReader(System.in));
        String s=b.readLine();
        char[] c=s.toCharArray();
        int l=c.length;
        char[] out=new char[l];
        int j=0;
        for(int i=0;i<l;i++){
            if(i<l-3){
                if( c[i]=='W' && c[i+1]=='U' && c[i+2]=='B' ){
                    if(j!=0){
                        out[j]=' ';
                        j++;
                    }
                    i=i+2;
                    continue;
                }
            }
            else if(i==l-3){
                if(c[i]=='W' && c[i+1]=='U' && c[i+2]=='B'){
                    i=i+2;
                    continue;
                }
            }
            out[j]=c[i];
            j++;
            }
        for(int i=0;i<j;i++){
            System.out.print(out[i]);
        }
    }
}

import java.util.*;
public class Str {
public static void main(String []args)
{   Scanner sr=new Scanner(System.in);
    String s=sr.next();
    s=s.replaceAll("WUB"," ");
    System.out.println(s);
}
}

import java.util.Scanner;

/**
 *
 * @author mitnick98
 */
public class Main {
    public static void MOstrar(String[] arr){
        for (int i = 0; i < arr.length && arr[i]!= null; i++) {
            System.out.print(arr[i]+" ");
        }
        System.out.println("");
    }

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String a = s.next();
        String p = "WUB";
        String []arr = new String[200];
        int k=0;
        int n =0, f =0 ;
        int j =0, i;
        for (i = 3; i <= a.length(); i+=3) {
            if(!a.substring(i-3,i).equals(p)){
                n = i-3;
                for (j = i-3; j < a.length()-2; j++) {
                    if(a.substring(j,j+3).equals(p)){
                        f = j;
                        break;
                    }
                    else if((j+3==a.length())){
                        f = j+3;
                        break;
                    }
                }

                arr[k] = a.substring(n, f);
                i = j+3;
                k++;
            }
        }
        if(a.length()< i)
            arr[k] = a.substring(i-3);
        MOstrar(arr);

    }
}

import java.util.Scanner;
public class Finale {
    public static void main(String[] args) {
        // TODO Auto-generated method stub
 Scanner input = new Scanner(System.in);

 String str = input.nextLine();

str= str.replace("WUB", " ");
str=str.trim();
System.out.print(str);

 //  input.close();

    }//main
}//class

//while(input.hasNextLine())
// { input.nextLine();
 //}

import java.util.Scanner;
public class Main {
public static void main(String args[])
{
    Scanner in=new Scanner(System.in);
    String song;
    int s=0;
    boolean flag=false;

    song=in.next();
    char[] cSong=song.toCharArray();
    for(int i=0;i<cSong.length-2;i++)
    {
        if(cSong[i]=='W'&&cSong[i+1]=='U'&&cSong[i+2]=='B')
        {
            cSong[i]='0';
            cSong[i+1]='0';
            cSong[i+2]='0';
        }
    }
    for(int i=0;i<cSong.length;i++)
    {

        if(cSong[i]=='0')
        {
            s=i;
            if(flag==true)
            {
                System.out.print(" ");
            }
            flag=false;
            continue;

        }
        else
        {

            System.out.print(cSong[i]);
            flag=true;
        }
    }
}
}

import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.FileReader;
import java.io.BufferedWriter;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.File;
import java.io.Writer;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author jarek
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        String s = in.nextLine();
        while (s.startsWith("WUB"))
            s = s.substring(3);
        while (s.endsWith("WUB"))
            s = s.substring(0, s.length() - 3);
        if (s.indexOf("WUB") < 0) {
            out.print(s);
            return;
        }
        String[] tmp = s.split("WUB");
        for (int i = 0; i < tmp.length; ++i) {
            out.print(tmp[i]);
            if (i < tmp.length - 1)
                out.print(" ");
        }
    }
}

class InputReader {
    BufferedReader br;

    public InputReader(File f) {
        try {
            br = new BufferedReader(new FileReader(f));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    public InputReader(InputStream f) {
        br = new BufferedReader(new InputStreamReader(f));
    }

    public String nextLine() {
        try {
            return br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void close() {
        writer.close();
    }
}

//codeforces
import java.util.Scanner;
public class NewClass {
    public static void main(String args[]){
      Scanner scanner = new Scanner(System.in);
      String input = scanner.nextLine();
      input = input.replace("WUB", " ");
      System.out.println(input);
    }
}

import java.util.*;
import java.math.*;
import java.io.*;

public class Main
	{
	public static void main(String args[]) throws IOException
		{
		BufferedReader c=new BufferedReader(new InputStreamReader(System.in));
		String s=c.readLine();
		String ans="";
		Queue<String> Q=new LinkedList<String>();
		while(s.contains("WUB"))
			{
			int index=s.indexOf("WUB");
			if(ans.equals(""))
				{
				if(!s.substring(0,index).trim().equals(""))
					Q.add(s.substring(0,index));
				s=s.substring(index+3,s.length());
				}
			else
				{
				if(!s.substring(0,index).trim().equals(""))
					Q.add(s.substring(0,index));
				s=s.substring(index+3,s.length());
				}
			}
		if(!s.equals(""))
			Q.add(s);
		while(!Q.isEmpty())
			System.out.print(Q.poll()+" ");
		}
	}

//must declare new classes here

import java.util.Scanner;
import java.lang.*;

import java.util.regex.Pattern;

public class Example {
   public static int[] Sort(int[] p)
   {
        for(int i=0;i<p.length-1;i++)
        {
            for (int j=i+1;j<p.length;j++)
            {
                if(p[i]>p[j])
                {
                    int temp=p[i];
                    p[i]=p[j];
                    p[j]= temp;
                }
            }
        }
        return p;
   }
   public static int Min(int[] p,int m,int n)
   {
       int min=1000;
           for (int i = 0; i <= m - n; i++) {
               int temp = p[n + i-1] - p[i];
               if (temp < min) min = temp;
           }

       return min;
   }

    public static void main(String[] args) {
        String s;
        boolean flag= false;
        Scanner sc = new Scanner(System.in);
        s=sc.next();
        for(int i=0;i<s.length();i++)
        {
            /*if(i>s.length()-3) System.out.print(s.charAt(i) +" " +s.charAt(i));
            else if(s.charAt(i)=='W'&&s.charAt(i+1)=='U'&&s.charAt(i+2)=='B')
            {
                i=i+2;
            }
            else
            {*/
            if(i<s.length()-2) {
                if (s.charAt(i) != 'W' || s.charAt(i + 1) != 'U' || s.charAt(i + 2) != 'B') {
                    System.out.print(s.charAt(i));
                    if (i == s.length()) break;
                }
                else
                {
                    System.out.print(" ");
                    i = i + 2;
                }

            }
            else System.out.print(s.charAt(i));

        }
    }
}

import java.util.Scanner;

public class Dubstep2_Cak {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String masuk = sc.nextLine();
		masuk = masuk.replaceAll("WUB"," ");
		String keluar = "";
		for(int i=0 ; i < masuk.length() ; i++){
			if (i == masuk.length()-1){
				keluar += masuk.charAt(i);
				break;
			}
			if (masuk.charAt(i) == ' ' && masuk.charAt(i) == masuk.charAt(i+1));
			else keluar += masuk.charAt(i);
		}
		int temp;
		if (keluar.charAt(0) == ' ') temp = 1;
		else temp = 0;
		int temp2;
		if (keluar.charAt(keluar.length()-1) == ' ') temp2 = keluar.length()-2;
		else temp2 = keluar.length()-1;
		keluar = keluar.substring(temp, temp2+1);
		System.out.println(keluar);
	}
}

import java.util.Scanner;
 import java.util.*;
public class Codefor {

  public static void main(String[] args) {
      int i=0 ,j=0;
      ArrayList<Character> list = new ArrayList<Character>();

      Scanner sc = new Scanner(System.in);
      String word = sc.nextLine();
      int length = word.length();
      if(length <= 200){
      char wub [] = {'W','U','B'} ;
      word = word.toUpperCase();
      char arr[] = word.toCharArray();
      while(i!=arr.length)
      {

         if(length>2)
         if(  arr.length >2 && arr[i]==wub [j] && arr[i+1]==wub [j+1] && arr[i+2]==wub [j+2]  )
         {

             if(i>0 && i+3 !=arr.length)
             list.add(' ');
              while(i+1!=arr.length &&i+2!=arr.length &&arr[i]==wub[j] && arr[i+1]==wub[j+1] && arr[i+2]==wub[j+2]  )
              {

                i=i+3;
                length=length-3;
                if(i==arr.length)
                    break;

                     j=0;

              }

         }

          if(i==arr.length)
                break;
           list.add(arr[i]);
            i++;
            length--;

        }
      for(char c : list)
      {
         System.out.print(c);
      }

      }
      }

}

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sin = new Scanner(System.in);
		String tmp = sin.next();
		tmp = tmp.replaceAll("(WUB)+", " ");
		System.out.print(tmp.trim());
	}
}

import java.util.*;
import java.lang.*;
import java.math.*;

public class Dubstep
{
    public static void main(String args[])
    {
        Scanner sn=new Scanner(System.in);
        String str;
        str=sn.nextLine();
        str=str.replaceAll("WUB"," ").trim();
        System.out.println(str.replaceAll("  "," ").trim());
    }
}

import java.util.Scanner;

public class Main{

    public static void main(String[] args) {
       Scanner sc=new Scanner(System.in);
      String s=sc.nextLine();

      char ch[]=new char[s.length()];
      String s2=s.replaceAll("WUB","*");
       ch=s2.toCharArray();
       for(int i=0;i<ch.length;i++)
       {
           if(ch[i]!='*'){
               System.out.print(ch[i]);
           }
           else
               System.out.print(" ");
       }
}}

import java.util.Scanner;

public class JavaApplication156 {
    public static void main(String[] args) {

        Scanner reader=new Scanner(System.in);
        String in = reader.next();
        String out =in.replaceAll("WUB", " ");
        System.out.println(out);

    }}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

    static StringBuilder data;

    public static void main(String[] args) {
        // Scanner in = new Scanner(System.in);
        FastReader in = new FastReader();
        String a = in.nextLine();
        String answ;
        answ = a.replaceAll("WUB", " ").trim();
        System.out.println(answ);
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        float nextFloat() {
            return Float.parseFloat(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

}

import java.io.*;
import java.util.*;
import java.text.*;
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

 public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        int i,j,n,k=0;
        String word;
        char[] word_arr;

        word=in.nextLine();
        word_arr=word.toCharArray();

        n=word_arr.length;

        int[] dub=new int[n];

        for(i=0;i<n-2;i++){
            if(word_arr[i]=='D' && word_arr[i+1]=='U' && word_arr[i+2]=='B'){
                dub[k]=i;
                k++;
            }
        }

        System.out.println(1);

        for(i=0;i<dub[0];i++){
            System.out.print(word_arr[i]);
        }

        System.out.println(2);

        if(dub[0]!=0) System.out.print(" ");

        /* for(i=1;i<k;i++){
            for(j=dub[i-1]+3;j<dub[i];j++){
                System.out.print(word_arr[j]);
            }

            if(dub[i]!=(dub[i-1]+3) ) System.out.print(" ");
        }

        */

        System.out.println(3);

       /* for(i=dub[k-1]+3;i<n;i++){
            System.out.print(word_arr[i]);
        }
        */

        System.out.println(4);

   }
}

import java.util.*;

public class dubstep{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String[] list = str.split("WUB");
        String res = "";
        for(String var : list){
            if(var != " "){
            res += var;
            }
        }
         System.out.println(res);
    }
}

import java.util.*;

public class Contest {
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String s;
		s = scan.next();
		s = s.replace("WUB", " ");
		char r[] = new char[s.length()];
		boolean space = true, first = true;
		int iter = 0;
		for(int i = 0; i < s.length(); i++)
		{
			if (!space && s.charAt(i) == ' ')
			{
				space = true;
			}
			else if (Character.isUpperCase(s.charAt(i)))
			{
				if (space && !first)
					r[iter++] = ' ';
				r[iter++] = s.charAt(i);
				space = false;
				first = false;
			}
		}
		r[iter] = '\0';
		System.out.println(r);
		scan.close();

	}
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
import java.util.Scanner;
/**
 *
 * @author mohammad
 */
public class step {
    public static void main(String[] args) {
        Scanner m=new Scanner(System.in);
        String g=m.next();
       String w=g.replaceAll("WUB","");
        System.out.println(w);
    }
}

import java.util.Scanner;

public class Prob208A {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next().replace("WUB", " ");
        String s1 = "";
        boolean r = true;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) != ' ') {
                s1 += s.charAt(i);
            }
            if (i > 1) {
                if (s.charAt(i) == ' ' && s.charAt(i - 1) != ' ') {
                    s1 += " ";
                }
            }
        }
        System.out.println(s1);
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class A208 {
	public static void main(String[] args)throws Exception{
		String in = IO.nextString();
		int s=0;
		for(int i=0;i<in.length();){
			if(in.charAt(i)=='W'){
				if(i+1<in.length() && in.charAt(i+1)=='U'){
					if(i+2<in.length() && in.charAt(i+2)=='B'){
						if(s==1){
							IO.print(" ");
							s=0;
						}
						i+=3;
					}else{
						IO.print("WU"+in.charAt(i+2));
						s=1;i+=3;
					}
				}else{
					IO.print("W"+in.charAt(i+1));
					s=1;i+=2;
				}
			}else {
				IO.print(in.charAt(i));
				s=1;i++;
			}
		}
	}
	static class IO {

        static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public static int[][] next2dInt(int rows, int cols, String seperator) throws Exception {
            int[][] arr = new int[rows + 1][cols + 1];
            for (int i = 1; i <= rows; ++i) {
                arr[i] = nextIntArray(cols, seperator);
            }
            return arr;
        }

        public static int[] nextIntArray(int nInts, String seperator) throws IOException {
            String ints = br.readLine();
            String[] sArray = ints.split(seperator);
            int[] array = new int[nInts + 1];
            for (int i = 1; i <= nInts; ++i) {
                array[i] = Integer.parseInt(sArray[i - 1]);
            }
            return array;
        }

        public static long[] nextLongArray(int nLongs, String seperator) throws IOException {
            String longs = br.readLine();
            String[] sArray = longs.split(seperator);
            long[] array = new long[nLongs + 1];
            for (int i = 1; i <= nLongs; ++i) {
                array[i] = Long.parseLong(sArray[i - 1]);
            }
            return array;
        }

        public static double[] nextDoubleArray(int nDoubles, String seperator) throws IOException {
            String doubles = br.readLine();
            String[] sArray = doubles.split(seperator);
            double[] array = new double[nDoubles + 1];
            for (int i = 1; i <= nDoubles; ++i) {
                array[i] = Double.parseDouble(sArray[i - 1]);
            }
            return array;
        }

        public static char[] nextCharArray(int nChars, String seperator) throws IOException {
            String chars = br.readLine();
            String[] sArray = chars.split(seperator);
            char[] array = new char[nChars + 1];
            for (int i = 1; i <= nChars; ++i) {
                array[i] = sArray[i - 1].charAt(0);
            }
            return array;
        }

        public static int nextInt() throws IOException {
            String in = br.readLine();
            return Integer.parseInt(in);
        }

        public static double nextDouble() throws IOException {
            String in = br.readLine();
            return Double.parseDouble(in);
        }

        public static long nextLong() throws IOException {
            String in = br.readLine();
            return Long.parseLong(in);
        }

        public static int nextChar() throws IOException {
            String in = br.readLine();
            return in.charAt(0);
        }

        public static String nextString() throws IOException {
            return br.readLine();
        }

        public static void print(Object... o) {
            for (Object os : o) {
                System.out.print(os);
            }
        }

        public static void println(Object... o) {
            for (Object os : o) {
                System.out.print(os);
            }
            System.out.print("\n");
        }

        public static void printlnSeperate(String seperator, Object... o) {
            StringBuilder sb = new StringBuilder();
            sb.delete(sb.length() - seperator.length(), sb.length());
            System.out.println(sb);
        }
    }
}

import java.util.*;

 public class Dcoder
 {
	public static void main(String args[])
 	{
 		Scanner input = new Scanner(System.in);

 		String s =input.next();
 		int j =0;
 		if(s.length()>3){

 		for(int i=0;i<s.length();i++){

 			if(s.charAt(i)=='W'){
 				if(i+1<s.length()&&s.charAt(i+1)=='U'){
 					if(i+2<s.length()&&s.charAt(i+2)=='B'){
 						i+=2;
 					}else{
 						j++;
 						System.out.print(" WU");
 					}
 				}else{
 					j++;
 					System.out.print(" W");
 				}
 			}else{
 				j++ ;
 				if(j>1){
 					if(i-3>-1&&s.charAt(i-3)=='W'&&i-2>-1&&s.charAt(i-2)=='U'&&i-1>-1&&s.charAt(i-1)=='B'){
 					System.out.print(" ");
 					}
 				}

 				System.out.print(s.charAt(i));
 			}
 		}
 		}else{
 			System.out.print(s);
 		}

 	}
 }

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Scanner;

public class semianr8 {

	public static void main(String [] args){
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		String st = "";
		for(int i = 0;i<str.length()-3;i++){
			if(str.charAt(i)=='B' && str.charAt(i-1)=='U'){
				int index = 0;
//				if(str.charAt(str.indexOf("W",i)+1) == 'U'){
//					index = str.indexOf("W",i);
//				} else {
//					index = str.indexOf("W",str.indexOf("W",i));
//				}
				st+= str.substring(i+1,str.indexOf("W",i+2)) + " ";
			}
		}
		System.out.println(st);
	}
}

import java.util.*;
public class first {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner x = new Scanner(System.in);

		String a = x.nextLine();
		String output = "";
		int n=3;

		for(int i=0; i<3; i++){
			if(a.charAt(i)!='W' && a.charAt(i+1)!='U' && a.charAt(i+2)!='B') output+=a.charAt(i);
			else{
				if(i==0) i+=2;
				else {
					output+=' ';
					i++;
				}
			}

		}

		for(int i=3; a.charAt(i)!='W' && a.charAt(i+1)!='U' && a.charAt(i+2)!='B'; i++ ){
			n=i;
			output+=a.charAt(i);
		}

		if(n>3)output+=' ';

		for (int i=n; i<a.length(); i++){
			if(a.charAt(i-3)=='W' && a.charAt(i-2)=='U' && a.charAt(i-1)=='B' && (a.charAt(i)!='W' || a.charAt(i+1)!='U' || a.charAt(i+2)!='B')){
				output+=a.charAt(i);
				for(int e=i+1; e<a.length(); e++){
					if(a.charAt(e)=='W' && a.charAt(e+1)=='U' && a.charAt(e+2)=='B'){
						output+=' ';
						break;
					}
					else
						output+=a.charAt(e);
				}
			}

		}

		System.out.println(output);
	}

}

import java.util.*;
public class dub{
public static void  main(String[] args)
{
    Scanner sc= new Scanner(System.in);
    String s=sc.nextLine();
    int n=0;
    StringBuilder sb= new StringBuilder(s);
    while(sb.toString().contains("WUB"))
    {
       n= sb.indexOf("WUB");
       sb.delete(n,n+2);

    }
    System.out.println(sb);

}
}

import java.util.Scanner;

public class Dubstep
{

    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        String input = in.next();
        int j = 1;
        int k = 2;
        String output ="";

        for ( int i=0  ; i<input.length()-2; i++)
        {

            if (input.charAt(i)=='W'&&input.charAt(j)=='U'&&input.charAt(k)=='B')
            {
              output=input.replaceAll(input.substring(i, k+1), " ");
            }

            k++;
            j++;

       }
        if ( input.length()<3)
        {
            System.out.println(input);
        }
        else
        System.out.println(output);
    }

}

import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
        String st,wd="";
        int i,j=0,l,k=0,p=0,q=0;

        st=sc.next();
        st=st.toUpperCase();
        l=st.length();
          int a[]=new int[l];
        for(i=0;i<(l-2);i++)
        {
            if((st.charAt(i)=='W')&&(st.charAt(i+1)=='U')&&(st.charAt(i+2)=='B'))
            a[k++]=i;
        }
        if(k!=0)
        {
        for(i=0;i<(k);i++)
        {
            if(i!=(k-1))
            {
            p=a[i];
            q=a[i+1];
            if((p!=0)&&(i==0))
            wd=wd+st.substring(0,p);
            else
            {
                if((q-p)!=3)
                {
            p=p+3;
            wd=wd+st.substring(p,q)+" ";
                }
                else
                continue;
            }
            }
            else
            {
                p=a[i];
                p=p+3;
                if(p!=l)
                wd=wd+st.substring(p,l)+" ";
            }
        }
        l=wd.length();
        wd=wd.substring(0,l-1);
        }
        else
        wd=st;
        System.out.println(wd);

    }
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Test
{
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String[] args)throws Exception
    {
        Reader.init(System.in);
        String s = Reader.next();
        StringBuilder res = new StringBuilder();
        int n = s.length();
        boolean first = true;
        boolean flag = false;
        if(s.equals("WUB"))
        {
            pw.println();
            pw.close();
            return;
        }

        for(int i = 0 ; i<n ; i++)
        {
            if(i == n-2 || i == n-1){
                res.append(s.charAt(i));
                continue;
            }

            char c1 = s.charAt(i);
            char c2 = s.charAt(i+1);
            char c3 = s.charAt(i+2);
            if(c1 == 'W' && c2 == 'U' && c3 == 'B')
            {
                i += 2;
                flag = true;
            }
            else if(first)
            {
                res.append(s.charAt(i));
                first = flag = false;
            }
            else if(flag)
            {
                res.append(" ").append(s.charAt(i));
                flag = false;
            }
            else res.append(s.charAt(i));

        }
        pw.println(res);
        pw.close();
    }

}

class Reader {

    static BufferedReader reader;
    static StringTokenizer tokenizer;

    public static int pars(String x) {
        int num = 0;
        int i = 0;
        if (x.charAt(0) == '-') {
            i = 1;
        }
        for (; i < x.length(); i++) {
            num = num * 10 + (x.charAt(i) - '0');
        }

        if (x.charAt(0) == '-') {
            return -num;
        }

        return num;
    }

    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input));
        tokenizer = new StringTokenizer("");
    }

    static void init(FileReader input) {
        reader = new BufferedReader(input);
        tokenizer = new StringTokenizer("");
    }

    static String next() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(
                    reader.readLine());
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return pars(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
}

import java.util.*;
import java.lang.*;
public class dub
{
	public static void main(String args[])
	{
		Scanner obj=new Scanner(System.in);
		String a,b;
		int i,j,l,space=0,m=0;
		a=obj.nextLine();
		b=a.replaceAll("WUB"," ");
		b=b.trim();
		l=b.length();
		char d;
		char c[]=new char[l];
		for(i=0;i<l;i++)
		{
			d=b.charAt(i);
			if(Character.isWhitespace(d))
			{
				c[i]='1';
			}
			else
				c[i]=d;
		}
		for(i=1;i<l;i++)
		{
			if(c[i]==c[i-1])
			{
				c[i-1]=0;
			}
		}
		for(i=0;i<l;i++)
		{
			if(c[i]=='0')
				continue;
			else if(c[i]=='1')
				System.out.print(" ");
			else
				System.out.print(c[i]);
		}
	}
}

import java.io.PrintWriter;
import java.util.Scanner;

public class n208A {

    Scanner in;
    PrintWriter out;

    void solve() {
        String s = in.nextLine();
        int i = 0;
        while (s.startsWith("WUB")) {
            s = s.substring(3);
        }
        StringBuilder r = new StringBuilder(s);
        s = r.reverse().toString();
        while (s.startsWith("BUW")) {
            s = s.substring(3);
        }
        while (i + 2 < s.length()) {
            boolean was = false;
            while (s.substring(i).startsWith("BUW")) {
                String rr = s.substring(0, i);
                if (!was) {
                    rr += " ";
                    was = true;
                }
                rr += s.substring(i + 3);
                s = rr;
                i ++;
            }
            i++;
        }
        r = new StringBuilder(s);
        out.println(r.reverse().toString());
    }

    void run() {
        in = new Scanner(System.in);
        out = new PrintWriter(System.out);
        try {
            solve();
        } finally {
            out.close();
        }
    }

    public static void main(String[] args) {
        new n208A().run();

    }

}

import java.util.Scanner;

public class Main {
	public static void main(String args[]) {

		Scanner akash = new Scanner(System.in);

		String str=akash.next();
		int count=0,i2=0,temp_count=0;

		for(int i=0;i<str.length();i++) {
			if(str.length()-3=='W') {
				break;
			}
			i2=i;
			if(str.charAt(i2)=='W' && str.charAt(i2+1)=='U' && str.charAt(i2+2)=='B') {
				if(count==1 && temp_count==0) {
					System.out.print(" ");
					i+=2;
					temp_count=1;
					continue;
				}
				else {
					i+=2;
					continue;
				}
			}
			else{

				System.out.print(str.charAt(i2));
				temp_count=0;
				count=1;
			}
		}
		System.out.print("\n");
		akash.close();
	}

}

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner lel = new Scanner (System.in);
        String s = lel.nextLine();
        for (int i=0;i<s.length();i++)
        {
            if (s.substring(i,i+3).equals("WUB"))
                i=i+2;
            else
                System.out.print(s.substring(i,i+1));
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class main {

	public static void main(String[] args) throws NumberFormatException,
			IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String s = bf.readLine();

		int g = 0;
		for (int i = 0; i < s.length(); i++) {
			g = i;
			int y = 0;
			if (s.charAt(i) == 'W') {
				if (s.substring(i, i + 3).compareTo("WUB") != 0)
					System.out.print(s.charAt(i));
				else {
					while (g < s.length()-2
							&& s.substring(g, g + 3).compareTo("WUB") == 0) {
						y++;
						 System.out.println(y);
						g += 3;
					}
					if (i > 3)
						System.out.print(" ");
					i = i + (3 * y) - 1;
				}
			} else
				System.out.print(s.charAt(i));
		}

	}
}

import java.util.Scanner;

public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
          int pos=0;
          int mem=0;
        String res ="";
        String x=input.next();

        while(true)
        {

       pos=x.indexOf("WUB",pos);

                if(pos==-1)
                {
            res+=x.substring(mem+3, x.length());

            break;

                }
               else if(pos==0&&mem==0)
                {
                    mem=pos;
                    pos=pos+1;
                    continue;
                }
               else if (mem==0&&pos>0)
                       {
                res+=x.substring(mem,pos)+" ";
                       }
               else
                    res+=x.substring(mem+3,pos)+" ";

         mem=pos;
        pos=pos+1;

        }

             System.out.println(res);
    }

}

//codeforces
import java.util.Scanner;
public class NewClass {
    public static void main(String args[]){
      Scanner scanner = new Scanner(System.in);
      String input = scanner.nextLine();
      input = input.replace("WUBB", " ");
      input = input.replace("WUB", " ");
      System.out.println(input);
    }
}

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
    String word = new Scanner(System.in).next();
    word = word.replaceAll("WUB", " ");
    word = word.replaceAll(" {2,}", " ");
    System.out.println(word.substring(1));
    }
}

import java.util.*;
public class ws{

    public static void main(String[] args){

        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        char a[]=s.toCharArray();
        int counter=0;

        for (int i = 0; i < s.length(); i++) {

            if(a[i]=='W'){
                counter=1;

            }
            if(a[i]=='U' && counter==1 && a[i-1]=='W'){
                counter=2;

            }
            if(a[i]=='B' && counter==2 && a[i-1]=='U' && a[i-2]=='W'){
                counter=3;
                System.out.println(a[i-2]+""+a[i-1]+""+a[i]);

                a[i]=' ';
                a[i-1]='0';
                a[i-2]='0';
            }

        }
        String k="";

        for(int i=0;i<a.length;i++){
           if(a[i]!='0'){
               k+=a[i];
               System.out.println(a[i]);
           }
        }
StringBuilder b=new StringBuilder(k);
        System.out.println(k);
       if(k.charAt(0)==' '){
        b.delete(0,1);}

       if(k.charAt(k.length()-1)==' ') {
           b.delete(k.length() - 1, k.length());
       }
        System.out.println(b.toString());

    }
}

import java.util.*;
public class wub {
	public static void main(String args[]){
		Scanner s=new Scanner(System.in);
		String a=s.nextLine();
		String b="";
		for(int i=0;i<a.length()-2;i++){
			if(a.substring(i,i+3).equals("WUB")){
				b=b+" ";
				i++;
				i++;
			}
			else{
				b=b+(a.charAt(i));
			}}
			if(a.substring(a.length()-3,a.length()).equals("WUB"))
				b=b;
			if(a.substring(a.length()-3,a.length()-1).equals("UB")){
			b=b+(a.charAt(a.length()-1));
	}
			if(a.substring(a.length()-3,a.length()-2).equals("B")){
				b=b+(a.charAt(a.length()-2));
				b=b+(a.charAt(a.length()-1));

			}
			int j=0,i=0;
			if(b.charAt(0)!=' '){
				System.out.print(b.charAt(0));
			while(j<b.length()-1){
				if((b.charAt(j)==' '&&b.charAt(j+1)==' ')){
					j++;
				}
				else{
					System.out.print(b.charAt(j+1));
					j++;}}

				}
			else{
				while(i<b.length()-1){
					if(b.charAt(i)==' '&&b.charAt(i+1)==' ')
						i++;
					else{
						System.out.print(b.charAt(i+1));
						i++;
					}

				}
			}
			}
	}

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String ss = "WUB#".concat(s);
        String ans = "";
        int []p = new int [ss.length()];
        for (int i = 1; i < p.length; i++) {
            int j = p[i-1];
            while (j > 1 && ss.charAt(j) !=ss.charAt(i)){
                j = p[j-1];
            }
            if (ss.charAt(j) == ss.charAt(i)){
                j++;
            }
            p[i] = j;
        }
        int j = p.length-1;
        while (j >=4){
            if (p[j] == 3){
                j -=3;
                if (!ans.equals(""))ans = " " + ans;
            }else{
                ans = s.charAt(j-4)+"" + ans;
                j--;
            }
        }
        System.out.println(ans.substring(1,ans.length()));
    }
}

import java.util.*;
//import java.math.*;

public class ProblemSet {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		String s = scan.next();
		boolean isWord = false;
		for(int i = 0 ; i < s.length(); i++) {

			if(s.charAt(i) == 'W') {

				if(s.charAt(i+1) == 'U') {

					if(isWord)
						System.out.print(" ");
					i += 2;
					continue;
				}

			}
			System.out.print(s.charAt(i));
			isWord = true;

		}

	}

}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        char[] StrArray = str.toCharArray();
        char[] resArray = new char[str.length()];
        int numRes = 0;
        if (str.length() <= 3) {
            System.out.println(str);
        } else {
            for (int i = 0; i < str.length() - 4; i++) {
                if (StrArray[i] == 'W' && StrArray[i + 1] == 'U' && StrArray[i + 2] == 'B') {
                    i += 2;
                } else {
                    resArray[numRes] = StrArray[i];
                    System.out.print(resArray[numRes]);
                    numRes++;
                    if (StrArray[i + 1] == 'W' && StrArray[i + 2] == 'U' && StrArray[i + 3] == 'B') {
                        System.out.print(' ');
                    }
                }
            }
            if (StrArray[str.length() - 4] == 'W' && StrArray[str.length() - 3] == 'U' && StrArray[str.length() - 2] == 'B') {
                System.out.print(StrArray[str.length() - 1]);
            } else if(StrArray[str.length() - 3] == 'W' && StrArray[str.length() - 2] == 'U' && StrArray[str.length() - 1] == 'B') {
                System.out.print(StrArray[str.length() - 4]);
            } else if (StrArray[str.length() - 5] == 'W' && StrArray[str.length() - 4] == 'U' && StrArray[str.length() - 3] == 'B') {
                System.out.print(StrArray[str.length() - 2]);
                System.out.print(StrArray[str.length() - 1]);
            } else if (StrArray[str.length() - 6] == 'W' && StrArray[str.length() - 5] == 'U' && StrArray[str.length() - 4] == 'B') {
                System.out.print(StrArray[str.length() - 3]);
                System.out.print(StrArray[str.length() - 2]);
                System.out.print(StrArray[str.length() - 1]);
            }
            System.out.println();
        }
    }
}

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
		String s=buf.readLine();
		s=s.toUpperCase();
		char ch[]=s.toCharArray();
		String st="";
		if(ch.length==1 || ch.length==2 || ch.length==3)
		st=s;
		else
		{
		int j=0,flag=0;
		while(j<ch.length-2)
		{
		    if(ch[j]=='W' && ch[j+1]=='U' || ch[j+2]=='B')
		    {
		    j=j+3;
		    if(flag==0)
		    st=st+" ";
		    flag=1;
		    }
		    else
		    {
		        st=st+ch[j];
		        j=j+1;
		        flag=0;
		    }
		}
		if((ch[ch.length-1]!='B' && ch[ch.length-2]!='U' && ch[ch.length-3]=='W') && (ch[ch.length-2]!='B' && ch[ch.length-3]!='U' && ch[ch.length-4]=='W'))
		st=st+ch[ch.length-2]+""+ch[ch.length-1];
	  }
	  st=st.trim();
	  System.out.println(st);
	}
}

import java.util.*;
public class mashy {

	public static boolean wub(String x){
			if(x.charAt(0)== 'W' && x.charAt(1)== 'U' && x.charAt(2)== 'B')
						return true;
			return false;
	}

    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
		String x = sc.nextLine();
		String a ="";
		boolean flag = false;
		int y ;
		y = x.length()%3;

		for(int i =0; i<x.length()-2;i+=3){
			for(;wub(x.substring(i,i+3))!= true && i<x.length()-3;i++){
				a = a + x.charAt(i);
				flag = true;
			}
			if(flag ){
				if(i==x.length()-3){

					break;}
			    flag = false;
				a = a + " ";

	}
	}
		if(y!=0 && wub(x.substring(x.length()-3)) == false)
			for(int i=x.length()-3;i<x.length();i++)
				a = a + x.charAt(i);

	System.out.print(a);
}}

import java.util.Scanner;

public class  Dubstep {

    public static void main(String[] args) {

         Scanner input=new Scanner(System.in);
         String s=input.next();

         char arr[]=s.toCharArray();

         int count=1;

         for (int i = 0; i < arr.length-3; i++) {

             if(arr[i]=='W'&&arr[i+1]=='U'&&arr[i+2]=='B')
             {
                 i=i+2;
                 if(count==0)
                 {
                     System.out.print(" ");
                 }
                 continue;
              }
             else
                 count=0;

             System.out.print(arr[i]);

        }

    }

}

import java.util.*;
import java.io.*;

import static java.lang.Math.*;
import static java.lang.System.exit;

public class Program {
    public static void main(String[] args) throws IOException {
        BufferedReader b = new BufferedReader(new InputStreamReader(System.in));
        String s=b.readLine();
        char[] c=s.toCharArray();
        int l=c.length;
        char[] out=new char[l];
        int j=0;
        for(int i=0;i<l;i++){
            if(c[i]=='W' && c[i+1]=='U' && c[i+2]=='B' && i<l-3){
                if(j!=0){
                    out[j]=' ';
                    j++;
                }
                i=i+2;
            }
            else{
                out[j]=c[i];
                j++;
            }
        }
        for(int i=0;i<j;i++){
            System.out.print(out[i]);
        }
    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        char[] StrArray = str.toCharArray();
        char[] resArray = new char[str.length()];
        int numRes = 0;
        if (str.length() <= 3) {
            System.out.println(str);
        } else {
            for (int i = 0; i <= str.length() - 4; i++) {
                if (StrArray[i] == 'W' && StrArray[i + 1] == 'U' && StrArray[i + 2] == 'B') {
                    i += 2;
                } else {
                    resArray[numRes] = StrArray[i];
                    System.out.print(resArray[numRes]);
                    numRes++;
                    if (StrArray[i + 1] == 'W' && StrArray[i + 2] == 'U' && StrArray[i + 3] == 'B') {
                        System.out.print(' ');
                    }
                }
            }
            for (int i = str.length() - 1; i > str.length() - 4; i--) {
                if (StrArray[i] == 'B' && StrArray[i - 1] == 'U' && StrArray[i - 2] == 'W') {
                    i -= 2;
                } else {
                    resArray[numRes] = StrArray[i];
                    System.out.print(resArray[numRes]);
                    numRes++;
                    if (StrArray[i - 3] == 'W' && StrArray[i - 2] == 'U' && StrArray[i - 1] == 'B') {
                        i -= 2;
                        System.out.print(' ');
                    }
                }
            }
            System.out.println();
        }
    }
}

import java.util.*;
public class Dj{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
String str;
str=sc.next();
int len,i,j,g=0,h,m=0;
len=str.length();
char[] ch=new char[len];
char[] chb=new char[len];
str.getChars(0,len,ch,0);

String stra="WUB ";
char[] cha=new char[4];
stra.getChars(0,4,cha,0);

for(i=0;i<len;i++){
if(ch[i]==cha[0] && ch[i+1]==cha[1] && ch[i+2]==cha[2]){
i=i+2;
}
else{
h=i;
for(j=g;j<len;j++){
if(m+1!=h && j!=0){
chb[j]=cha[3];
chb[j+1]=ch[i];
m=h;
g=j+2;
break;
}

else{
chb[j]=ch[i];
g=j+1;
m=h;
break;
}
}
}
}
for(i=0;i<len;i++){
System.out.print(chb[i]);
}

}
}

import java.util.Arrays;
import java.util.Scanner;
public class Codeforces2 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String sozlar=sc.next();
        String qirqim="";
        int k=1;
        do{
        	if(sozlar.indexOf("WUB")==0){
        		k=1;
        		sozlar=sozlar.substring(3,sozlar.length());
        	}else{
        		k=0;
        	}
        }while(k!=0);
        for(int i=0;i<sozlar.length();i++){
        if(sozlar.lastIndexOf("WUB")!=-1){
        if(sozlar.lastIndexOf("WUB")!=sozlar.length()-3){
        sozlar=sozlar.substring(0,sozlar.lastIndexOf("WUB"))+" "+sozlar.substring(sozlar.lastIndexOf("WUB")+3,sozlar.length());
        }else{
        	sozlar=sozlar.substring(0,sozlar.lastIndexOf("WUB"));
        }
        }else{
        	break;
        }
        }
        for(int i=0;i<sozlar.length();i++){
            if(sozlar.lastIndexOf("  ")!=-1){
                sozlar=sozlar.substring(0,sozlar.lastIndexOf("  "))+" "+sozlar.substring(sozlar.lastIndexOf("  ")+2,sozlar.length());
            }else{
            	break;
            }
            }
        System.out.print(sozlar);
    }
}

import java.util.ArrayList;
import java.util.Scanner;

public class Dubstep {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String word = scan.next();
        String s = "WUB";
        ArrayList<String> sentence = new ArrayList<>();
        boolean isWord = false;
        int pos = 0;
        while (pos < word.length()) {
            if (((pos + 3) < word.length() + 1) && word.substring(pos, pos + 3).equals(s)) {
                isWord = true;
                pos = pos + 3;
            } else if (pos >= word.length() - 3) {
                if (isWord == true) {
                    isWord = false;
                } else {
                    int tempPos = pos;
                    //System.out.println(pos);
                    while (!(tempPos + 3 > word.length()) && !word.substring(tempPos, tempPos + 3).equals(s)) {
                        tempPos++;
                        //System.out.println("Bu tempus" + tempPos);
                    }
                    sentence.add(word.substring(pos, word.length()));
                    if (tempPos + 3 > word.length()) {
                        pos = word.length();
                    }
                }
            } else {
                if (pos != word.length()) {
                    sentence.add(word.substring(pos, word.length()));
                }
                break;
            }
        }
        for (int i = 0; i < sentence.size() - 1; i++) {
            System.out.print(sentence.get(i) + " ");
        }
        System.out.print(sentence.get(sentence.size() - 1));
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class A {
    public static void main(String[] args) throws IOException {
        BufferedReader br  = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        int start = 0;
        for(int i = 0; i < s.length()-3; i += 3)
            if(!s.substring(i, i+3).equals("WUB")){
                start = i;
                break;
            }
        int end = 1;
        for(int i = s.length(); i >= 3; i -= 3)
            if(!s.substring(i-3, i).equals("WUB")){
                end = i;
                break;
            }

        String m = s.substring(start, end);
        m = m.replaceAll("WUB", " ");
        System.out.println(m);
    }
}

import java.util.Scanner;
public class wub {

    public static void main(String[]args)
    {
        Scanner scan=new Scanner(System.in);
        StringBuilder line=new StringBuilder(scan.nextLine());
        int i=0;
        String s="";
        try{
        while(line.length()!=0)
        {if (line.length()<=3&&line.length()>0){s=s+line;}
            if(line.substring(i, i+3).equals("WUB"))
            {
                line.replace(i, i+3, "");
            }
            else {
                while(!line.subSequence(i, i+3).equals("WUB"))
                {
                s+=line.charAt(i);
                line.replace(i, i+1, "");

                }
                s+=" ";
                 }

        }
        }catch(Throwable e) {}
        System.out.println(s.trim());

    }
}

import java.util.Scanner;

public class songs {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
 Scanner in = new Scanner(System.in);
 String S = in.nextLine();
 String result = "";
 for(int i=0;i<S.length();i++){
	 char c=S.charAt(i);
	 if(i<S.length()-3&&c=='W'&&S.charAt(i+1)=='U'&&S.charAt(i+2)=='B'){
				i=i+2;
	 }else {

		 if(i<S.length()-3&&S.charAt(i+1)=='W'&&S.charAt(i+2)=='U'&&S.charAt(i+3)=='B'){
			 result=result+c+" ";
		 }else {
			 result=result+c;
		 }
	 }
 }System.out.println(result);
	}

}

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String ss = "WUB#".concat(s);
        String ans = "";
        int []p = new int [ss.length()];
        for (int i = 1; i < p.length; i++) {
            int j = p[i-1];
            while (j > 1 && ss.charAt(j) !=ss.charAt(i)){
                j = p[j-1];
            }
            if (ss.charAt(j) == ss.charAt(i)){
                j++;
            }
            p[i] = j;
        }
        int j = p.length-1;
        if (p[6] != 3 )
            System.out.print(s.charAt(0));
        int k = 0;
        while (j >=4){
            if (p[j] == 3){
                j -=3;
                if (ans.length() == k)ans = " " + ans;
            }else{
                ans = s.charAt(j-4)+"" + ans;
                k = ans.length();
                j--;
            }
        }
        System.out.println(ans.substring(1,ans.length()));
    }
}

import java.util.Scanner;

public class C_130A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String w = "WUB";
		boolean f = true;
		for (int i = 0; i < s.length() - 3; i++) {
			if(s.substring(i,i+3).equals(w)){
				i+=2;
				if(!f) System.out.print(" ");
				f = false;
			}else{
				System.out.print(s.charAt(i));
			}
		}
	}
}

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String args[]) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inputReader = new InputReader(inputStream);
        PrintWriter printWriter = new PrintWriter(outputStream);
        TaskSolver solver = new TaskSolver(inputReader, printWriter);
        solver.solve();
        printWriter.close();
    }
}

class TaskSolver {
    private InputReader in;
    private PrintWriter out;

    public TaskSolver(InputReader inputReader, PrintWriter printWriter) {
        in = inputReader;
        out = printWriter;
    }

    public void solve() {
        StringBuilder s = new StringBuilder(in.next());
        while (s.indexOf("WUB") != -1) {
            s.replace(s.indexOf("WUB"), s.indexOf("WUB") + 3, " ");
        }
        while (s.indexOf("  ") != -1) {
            s.replace(s.indexOf("  "), s.indexOf("  ") + 3, " ");
        }
        StringTokenizer answer = new StringTokenizer(s.toString());
        while (answer.hasMoreTokens() && answer.countTokens() > 1) {
            out.print(answer.nextToken() + " ");
        }
        out.print(answer.nextToken());
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream inputStream) {
        reader = new BufferedReader(new InputStreamReader(inputStream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
}

import java.util.*;
public class Main{
    public static void main(String args[]){
        Scanner ec = new Scanner(System.in);
        String str = ec.next();
        boolean flag = false;
        for(int i = 0; i < str.length(); i++){
            if(str.charAt(i) == 'W' && str.charAt(i + 1) == 'U' && str.charAt(i + 2)=='B'){
                i += 2;
                if(!flag){
                    System.out.print(" ");

                }
                continue;
            }
            else{
                flag = true;
                System.out.print(str.charAt(i));
            }
        }
    }
}

import java.util.*;

public class me{

 public static void main(String args[])

 {
        Scanner in=new Scanner(System.in);
    String m=in.next();
    m.replaceAll("WUB", " ");

    System.out.println(m);

}
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
import java.util.Scanner;
/**
 *
 * @author mohammad
 */
public class step {
    public static void main(String[] args) {
        Scanner m=new Scanner(System.in);
        String g=m.next();
  System.out.println(g.trim().replaceAll("WUB",""));
    }
}

import java.util.Scanner;

public class Codefor {

  public static void main(String[] args) {
      int i=0 ,j=0,k=0;
      char word2 [] = new char[200];
      Scanner sc = new Scanner(System.in);
      String word = sc.nextLine();
      char wub [] = {'W','U','B'} ;
      word = word.toUpperCase();
      char arr[] = word.toCharArray();
      while(i!=arr.length)
      {
         if( arr[i]==wub[j] )
         {

             if(k>0 && i+3 !=arr.length)
              word2[k]=' ';
                while(arr[i]==wub[j] && arr[i+1]==wub[j+1] && arr[i+2]==wub[j+2]  )
              {

              //  j++;
                 i=i+3;
                if(i==arr.length)
                    break;
               // if(j>1)
                     j=0;

              }

         }

            if(i==arr.length)
                break;
            k++;
            word2[k]=arr[i];
            k++;
            i++;
        }
      for(i=0 ; i!=word2.length ; i++)
          System.out.print(word2[i]);

  }
}

import java.util.*;

public class q1
{
    String word;
    public void read()
    {
        Scanner in=new Scanner(System.in);

        word=in.next();
    }
    public String job()
    {
        int i,d=0,p=0;
        String w="";

        for(i=0;i<word.length();i++)
        {
            if(i==word.length()-1 && word.charAt(i)=='W')
            {
                w+=word.charAt(i);
            }
            else if(i==word.length()-2 && word.charAt(i)=='W' && word.charAt(i+1)=='U')
            {
                w+=word.charAt(i)+word.charAt(i+1);
            }
            else if(word.charAt(i)=='W' && word.charAt(i+1)=='U' && word.charAt(i+2)=='B')
            {
                i+=2;
                if(d>0 && p==0)
                {
                    w+=" ";
                    p++;
                }
            }
            else
            {
                d++;
                w+=word.charAt(i);
                p=0;
            }
        }
        return w;
    }
    public static void main(String[] args)
    {
        q1 work=new q1();

        work.read();

        System.out.println(work.job());
    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String in = sc.next();
        for(int i = 0 ; i < in.length() - 3 ;){
            if(in.charAt(i) == 'W' && in.charAt(i + 1) == 'U' && in.charAt(i + 2) == 'B'){
                i += 3;
                System.out.print(" ");
            }else{
                System.out.print(in.charAt(i));
                i++;
            }
        }
        sc.close();
    }

}

import java.util.Scanner;

public class C_130A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String w = "WUB";
		boolean f = true;
		for (int i = 0; i < s.length(); i++) {
			if(i+3<s.length() && s.substring(i,i+3).equals(w)){
				i+=2;
				if(!f) System.out.print(" ");
			}else{
				f = true;
				System.out.print(s.charAt(i));
			}
		}

	}
}

import java.util.*;
import java.math.*;

public class mayn {

	public static void main(String[] args) {
		Scanner scan = new Scanner (System.in);
		String input = scan.nextLine();
		String pattern = "WUB";
		int len = input.length();
		boolean [] wub = new boolean [len];
		for (int i=0 ; i<len ; i++) {
			wub[i] = false;
		}
		for (int i=0 ; i < input.length()- 2 ; i++) {
			String x = "";
			for (int j=i ; j<3 ; j++) {
				x += input.charAt(j);
			}
			if (x.equals(pattern)) {
				wub[i] = true;
				wub[i+1] = true;
				wub[i+2] = true;
			}
		}
		String output = new String();
		for(int i=0 ; i<len ; i++) {
			if(wub[i]) {
				output += input.charAt(i);
			} else {
				output += " ";
				while((i<len-1) && (!wub[i+1])) {
					i++;
				}
			}
		}
		System.out.println(output);
	}
}

/*
 Author: Togrul Gasimov
 Mail: ttogrul30@gmail.com
 */

import java.util.Collection;
import java.util.Comparator;
import java.util.Locale;
import java.util.Scanner;
import java.util.Vector;
import java.util.Arrays;
import java.math.BigInteger;
import java.math.BigDecimal;
import java.util.List;
import java.util.Stack;

public class Main {

static double u(double x1,double y1,double x2,double y2){
return Math.sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)  );
}
static int gcd(int a,int b){
	if(b==0)return a;
	else return gcd(b,a%b);
}

// static double PI=3.1415926535897932384626433832795;
  static String[] t = new String[100000];
  static int[][] a = new int[100001][3];
public static void main(String[] args) {
 Scanner scan = new Scanner(System.in);

   String s;

   s=scan.next();
   int j=0;
   for(int i=0;i<=s.length()-3;i++){
	  if(s.charAt(i)=='W' && s.charAt(i+1)=='U' && s.charAt(i+2)=='B'){
		  i+=2; j++; t[j]="";
	  }else{
		  t[j]+=s.charAt(i);
	  }
   }
   int k=0;
   String []f = new String[10000];
   for(int i=1;i<=j;i++){
	   if(t[i]!=""){
		   k++; f[k]=t[i];
	   }
   }

   for(int i=1;i<=k;i++){
	   if(i!=k){
		   System.out.print(f[i]+" ");
	   }
	   else{
		   System.out.println(f[i]);
	   }
   }

}
}

/*package whatever //do not write package name here */

import java.io.*;
import java.util.Scanner;

public class GFG {
	public static void main (String[] args) {
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		String n="";
		int l=s.length();
		int i=0;
		for(i=0;i<l;i++)
		{
		    if(i<=l-3)
		    {
		  if(s.charAt(i)=='W' && s.charAt(i+1)=='U' && s.charAt(i+2)=='B')
		  {
		      i=i+2;

		  }

		  else
		  {

		      n=n+s.charAt(i);

		      if(i<=l-3)
		      {if(s.charAt(i+1)=='W' && s.charAt(i+2)=='U' && s.charAt(i+3)=='B')
		      n=n+" ";
		      }
		  }
		    }

		    else
		    break;
		}
	if(i==l-2)
	n=n+s.charAt(l-2)+s.charAt(l-1);
	System.out.println(n);
	}
}

import java.util.*;

public class HelloWorld{

     public static void main(String []args){

        Scanner inp = new Scanner(System.in);
        ArrayList<Integer> start=new ArrayList<Integer>();
        ArrayList<Integer> songstart=new ArrayList<Integer>();
        ArrayList<Integer> songend=new ArrayList<Integer>();

        String song="";
        String dub="WUB";
        String check="";
        String dubsong=inp.nextLine();
        int len=dubsong.length();
        int i=0;
        for(i=0;i<=len-3;i++)
        {

            check=dubsong.substring(i,i+3);
            if(check.equals(dub))
                {
                    start.add(i);
                     System.out.println("caught at :" + i);
                }
        }

        int k=start.size();
        int l=0;
        for(i=0;i<k-1;i++)
        {
            if(start.get(i+1)!=(start.get(i)+3))
            {
                songstart.add(start.get(i)+3);
                songend.add(start.get(i+1));

            }
        }

        int len2=songstart.size();
        for(i=0;i<len2;i++)
        {
            song=song.concat(dubsong.substring(songstart.get(i),songend.get(i)))+" ";
        }

        System.out.println(song);

     }
}

import java.util.Scanner;
public class JavaApplication29 {

    public static void main(String[] args) {
       Scanner input =  new Scanner(System.in);
       String oldsong=input.next();
//        String sub = oldsong.substring(0, 3);
//        String sub2 = oldsong.substring(4, 6);
//        String sub3 = oldsong.substring(6);
        String newsong = null;
        for(int i=0; i<oldsong.length(); i++){
        if(oldsong.contains("WUB")){
          newsong=oldsong.replaceAll("WUB"," ");

            }
        }
        System.out.println(newsong + " ");
    }

}

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Dubstep {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String song = br.readLine();
		StringBuffer songBuff = new StringBuffer(song);
		String finalString = "";
		boolean isSpace = false;
		for (int i = 0; i < song.length(); i++) {
			if (song.charAt(i) == 'W') {
				if (i + 2 < song.length()) {
					if (song.charAt(i + 1) == 'U') {
						if (song.charAt(i + 2) == 'B') {
							i += 2;
							isSpace = true;
							//finalString += " ";
						} else {
							if(isSpace) {
								finalString += " ";
								isSpace = false;
								}
							finalString += song.charAt(i) + "" + song.charAt(i + 1);
							i += 1;

						}
					} else {
						if(isSpace) {
							finalString += " ";
							isSpace = false;
							}
						finalString += song.charAt(i) + "" + song.charAt(i + 1);
						i += 1;

					}
				} else {
					if(isSpace) {
						finalString += " ";
						isSpace = false;
						}
					finalString += song.charAt(i);
				}
			} else {
				if(isSpace) {
				finalString += " ";
				isSpace = false;
				}
				finalString += song.charAt(i);
			}
		}
		System.out.println(finalString.trim());
	}
}

import java.util.*;

public class A_Dubstep_208A {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner cadena = new Scanner(System.in);
		String palabra = cadena.nextLine();
		String caracter = "";
		int i = 0;
		int indicador = 0;
		while(i < palabra.length()) {
			caracter = palabra.substring(i, i+1);
			if(caracter.equals("W")) {
				i++;
				caracter = palabra.substring(i, i+1);
				if(caracter.equals("U")) {
					i++;
					caracter = palabra.substring(i, i+1);
					if(caracter.equals("B")) {
						if(indicador == 0) {
							i++;
							indicador = 1;
						}else {
							if(indicador == 1) {
								System.out.print(" ");
								i++;
							}
						}
					}else {
						System.out.print("W");
					}
				}else {
					System.out.print("W");
				}
			}else {
				System.out.print(caracter);
				i++;
			}
		}
	}

}

import java.util.Scanner;

public class probB {

    public static void main(String[] args) {
         Scanner vb=new Scanner(System.in);

         String s=vb.nextLine();

         s=s.replace("WUB", "-");
         String g="";
         for(int i=0;i<s.length()-1;i++){
             if(s.charAt(i)=='-' && s.charAt(i+1)=='-') g+=" ";
             else g+=s.charAt(i);
         }

          g=g.replace("-", " ");
          g=g.trim();
          int a[]=new int[g.length()];

          for(int i=0;i<g.length();i++){
              if(g.charAt(i)==' ') a[i]=1;
              else a[i]=0;

          }
          System.out.println();
          boolean buf = false;

          for(int i=0;i<g.length();i++){

              if(a[i]==0) {System.out.print(g.charAt(i));  buf=true;}
              else{
                   if(buf)
                   System.out.print(" ");
                   buf=false;
              }

                  }

    }

}

import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class CodeForcesRoman {

	public static void main(String[] args)throws IOException,NumberFormatException {
		try {
			FastScanner sc=new FastScanner();
		    char a[]=sc.next().toCharArray();
			List<Character> list=new ArrayList<>();
			int j=0;
			for(int i=0;i<a.length-2;i++) {
				if(a[i]=='W') {
					if(a[i+1]=='U') {
						if(a[i+2]=='B') {
							if(!list.isEmpty()) {
								if(list.get(j-1)!=' ') {
								list.add(' ');
								j++;
								}
							}
							i=i+2;
							continue;
						}
					}
				}
				list.add(a[i]);
				j++;
			}

			String s="";
			for(int i=0;i<list.size();i++) {
				s+=(String.valueOf(list.get(i)));
			}
			System.out.println(s);
		}

		catch(Exception e) {
			return;
		}
	}

	public static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
                                      st=new StringTokenizer(br.readLine());
                              } catch (IOException e) {}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}

	}

}

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
		String s=buf.readLine();
		String ss1="",ss2="";
		s=s.toUpperCase();
		char ch[]=s.toCharArray();
		String st="";
		if(ch.length==1 || ch.length==2 || ch.length==3)
		st=s;
		else
		{
		int j=0,flag=0;
		while(j<ch.length-2)
		{
		    if(ch[j]=='W' && ch[j+1]=='U' || ch[j+2]=='B')
		    {
		    j=j+3;
		    if(flag==0)
		    st=st+" ";
		    flag=1;
		    }
		    else
		    {
		        st=st+ch[j];
		        j=j+1;
		        flag=0;
		    }
		}
		 ss1=s.substring(ch.length-3);
	    ss2=s.substring(ch.length-4,ch.length-1);
		if(ss1.equals("WUB"))
		{

		}
		else
		{
		    if(ss2.equals("WUB"))
		    st=st+ch[ch.length-1];
		    else
		    st=st+ch[ch.length-2]+""+ch[ch.length-1];
		}

	  }
	  st=st.trim();
	  System.out.println(st);
	}
}

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s=sc.next(),rus="";
        boolean count=false;
        s=s.replace("WUB"," ");
        for (int j = 0; j < s.length(); j++) {
            if (s.charAt(j) != ' '&&count==false) {
                    count=true;
                for (int i = j; i < s.length(); i++)
                    rus += s.charAt(i);

            }else continue;
        }

        if(count)
            s=rus;
            rus="";
            count=false;
        {
            for (int j = s.length()-1; j >0 ; j--) {
                if (s.charAt(j) != ' '&&count==false) {
                    count=true;
                    for (int i = 0; i <= j; i++)
                        rus += s.charAt(i);

                }else continue;
            }
        }
        rus= rus.replaceAll("  "," ");
        rus= rus.replaceAll("   "," ");
        rus= rus.replaceAll("    "," ");
        rus= rus.replaceAll("     "," ");
        rus= rus.replaceAll("      "," ");
        rus= rus.replaceAll("       "," ");
        rus= rus.replaceAll("        "," ");
        rus= rus.replaceAll("         "," ");

       /* String[] r=rus.split(" ");
        for (int i=0;i<r.length;i++)
            System.out.print(r[i]);*/

        //System.out.print(rus);
        System.out.print(rus);
    }}

import java .util.*;
public class Soln
{
    public static void main(String args[])
    {
        Scanner s=new Scanner(System.in);
       String ss=s.next();
       ss=ss.replaceAll("WUB","");
       System.out.println(ss);
    }
}

import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;
import java.util.Vector;

public class first {

    /**
     * @param args
     * @throws IOException
     */

    public static void main(String[] args) throws IOException {
           Scanner sc=new Scanner(System.in);
           String s=sc.next();
           boolean fl=true;
           for (int i=0; i<s.length()-2; i++)
           {
               if (s.charAt(i)=='W' && s.charAt(i+1)=='U'&& s.charAt(i+2)=='B')
               {
                   if (!fl)
                   {
                       fl=true;
                       System.out.print(" ");
                   }
                   i+=2;
               }
               else
               {
                   fl=false;
                   System.out.print(s.charAt(i));
               }
               }

           System.out.flush();
           }

    }

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws NumberFormatException,
			IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String s = bf.readLine();
		//System.out.println(s.length());
		int g = 0;
		boolean flag=false;
		for (int i = 0; i < s.length(); i++) {
			g = i;
			int y = 0;
			if (s.charAt(i) == 'W' && s.length() - i >= 3) {
				if (s.substring(i, i + 3).compareTo("WUB") != 0)
					System.out.print(s.charAt(i));
				else {
					while (g < s.length() - 2
							&& s.substring(g, g + 3).compareTo("WUB") == 0) {
						y++;
						// System.out.println(y);
						g += 3;
					}
					i = (i + (3 * y)) - 1;
					// /System.out.println(i);
					if (flag)
						System.out.print(" ");

				}
			} else{
				System.out.print(s.charAt(i));
			    flag=true;}
		}

	}
}

import java.util.Scanner;
public class Main
{
  public static void main(String[]args)
  {
    Scanner rbt=new Scanner(System.in);
    String s=rbt.next();
    String ss="";
    for(int i=0; i<s.length(); i++)
    {
      if(s.charAt(i)=='W' && (i+2)<s.length())
      {
      if(s.charAt(i)=='W' && s.charAt(i+1)=='U' && s.charAt(i+2)=='B')
      {
        if(ss.length()!=0 && ss.charAt(ss.length()-1)!=' ') ss+=" ";
      //  System.out.println(s.charAt(i)+" ");
        i+=2;
      }
      }
      else ss+=s.charAt(i);
    }
    System.out.println(ss);
  }
}

import java.util.*;
import java.io.*;

public class Main{
    public static void main(String[] args) throws IOException, StringIndexOutOfBoundsException{
        Reader rd = new Reader();
        String s = rd.next();
        String out = "";

        boolean init = false;
        for(int i=0; i<s.length(); i++){
            try{
                if(s.charAt(i)=='W' && s.charAt(i+1)=='U' && s.charAt(i+2)=='B'){
                i+=2;
                if(init){
                out+=" ";
                }
            }
            else{
                out+=s.charAt(i);
                init = true;
            }}
            catch(StringIndexOutOfBoundsException e){
                boolean nothing = true;
            }
        }

        System.out.println(out);

    }
}

/*Reader class*/
class Reader
{
    BufferedReader br;
    StringTokenizer tk;
    Reader() throws IOException
    {
        br=new BufferedReader(new InputStreamReader(System.in));
        tk=new StringTokenizer("");
    }
    public int nextInt() throws IOException
    {
        while(!tk.hasMoreTokens())
        {
            tk=new StringTokenizer(br.readLine().replaceAll("\r",""));
        }
        return Integer.parseInt(tk.nextToken());
    }
    public Float nextFloat() throws IOException
    {
        while(!tk.hasMoreTokens())
        {
            tk=new StringTokenizer(br.readLine().replaceAll("\r",""));
        }
        return Float.parseFloat(tk.nextToken());
    }
    public String next() throws IOException
    {
        return br.readLine();
    }
}

import java.util.*;
import java.io.IOException;
public class dubstep {
    public static void main (String[] args) throws IOException{
        Scanner input = new Scanner(System.in);
        String a = input.next();
        char letters[]= a.toCharArray();
        char answer[]=new char[200];
        int k=0,l=1;
        for (int i = 0; i < letters.length; i++)
        {
if(k==0&&letters[i]=='W')
{  k++;
    continue;}
    if(k==1&&letters[i]=='U')
    { k++;
        continue;}
        if(k==2&&letters[i]=='B')
        {k=0;
         if(l==0) System.out.print(" ");
         l=1;
          continue;
        }
       l=0;
       if(k==1)
       {System.out.print("W" + letters[i]);
           k=0;}
       if(k==2) System.out.print("WU" + letters[i]);
        if(letters[i]=='W')k=1;
         else
        if(k==0) System.out.print(letters[i]);
            k=0;
       }
    }
}

import java.io.*;
import java.util.*;

public class Main{

	public static void main(String[] args) {
		MyScanner sc = new MyScanner();
		String str = sc.next();

		int n = str.length();
		StringBuilder sb = new StringBuilder();

		boolean found=false;

		for(int i=0; i<=n-3; ){
			if(str.substring(i,i+3).equals("WUB")){
				i+=3;
				if(found) sb.append(" ");
			}
			else{
				found = true;
				sb.append(str.charAt(i));
				i++;
			}
		}

		String answer = sb.toString();
		System.out.println(answer);

	}

	//-----------MyScanner class for faster input----------------------------------
	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String nextLine(){
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

	}
	//----------------------------------------------------------------------------
}

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String args[]) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inputReader = new InputReader(inputStream);
        PrintWriter printWriter = new PrintWriter(outputStream);
        TaskSolver solver = new TaskSolver(inputReader, printWriter);
        solver.solve();
        printWriter.close();
    }
}

class TaskSolver {
    private InputReader in;
    private PrintWriter out;

    public TaskSolver(InputReader inputReader, PrintWriter printWriter) {
        in = inputReader;
        out = printWriter;
    }

    public void solve() {
        StringTokenizer answer = new StringTokenizer(in.next(), "WUB");
        while (answer.hasMoreTokens() && answer.countTokens() > 1) {
            out.print(answer.nextToken() + " ");
        }
        out.print(answer.nextToken());
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream inputStream) {
        reader = new BufferedReader(new InputStreamReader(inputStream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
}

import java.util.Scanner;
public class Dubstep {

    public static void main(String[] args) {
        String x = "";
        String w =  "";
     Scanner input = new Scanner(System.in);
     String s = input.next();
     for(int i=0; i<s.length();i++){
          if(i<s.length()-2){
     if( s.charAt(i)=='W' && s.charAt(i+1)=='U' && s.charAt(i+2)=='B' ){
if(i!=0)
 w+=" ";
           i+=2;
     }}
     else w+=s.charAt(i);

     }

     System.out.println(w);

     }

    }

import java.util.Scanner;

public class Dubstep
{

    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        String input = in.next();
        int j = 1;
        int k = 2;
        String output ="";

        for ( int i=0  ; i<input.length()-2; i++)
        {

            if (input.charAt(i)=='W'&&input.charAt(j)=='U'&&input.charAt(k)=='B')
            {
              output=input.replaceAll(input.substring(i, k+1), " ");
            }
            k++;
            j++;
       }

        System.out.println(output);
    }

}

import java.util.Scanner;

public class Dubstep2_Cak {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String masuk = sc.nextLine();
		masuk = masuk.replaceAll("WUB"," ");
		String keluar = "";
		for(int i=0 ; i < masuk.length()-1 ; i++){
			if (masuk.charAt(i) == ' ' && masuk.charAt(i) == masuk.charAt(i+1));
			else keluar += masuk.charAt(i);
		}
		int temp;
		if (keluar.charAt(0) == ' ') temp = 1;
		else temp = 0;
		int temp2;
		if (keluar.charAt(keluar.length()-1) == ' ') temp2 = keluar.length()-2;
		else temp2 = keluar.length()-1;
		keluar = keluar.substring(temp, temp2+1);
		System.out.println(keluar);
	}
}

import java.util.*;
public class t{
    public static void main(String[] args){

         Scanner scan = new Scanner(System.in);
        String s = scan.next();
        char a[]=s.toCharArray();
        int counter=0;

        for (int i = 0; i < s.length(); i++) {

            if(a[i]=='W'){
                counter=1;

            }
            if(a[i]=='U' && counter==1){
                counter=2;

            }
            if(a[i]=='B' && counter==2){
                counter=3;
               a[i]=' ';
                a[i-1]='0';
                a[i-2]='0';
            }

        }
        String k="";

        for(int i=0;i<a.length;i++){
           if(a[i]!='0'){
               k+=a[i];

           }
        }
StringBuilder b=new StringBuilder(k);
        b.delete(0,1);
        b.delete(k.length()-2,k.length());

        System.out.println(b.toString());
    }

}

import java.util.Scanner;

public class dubstep {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int left = 0, right = 0;
		boolean is = false;
		for(int i = 0; i < s.length() - 1; i++) {
			if(i >= s.length() - 2) {
				System.out.println(s.substring(i));
				break;
			}
			else if(s.substring(i, i + 3).equals("WUB")) {
				right = i - 1;

				if(is) {
					is = false;
					if(right > 0 && right != left){
						System.out.print(s.substring(left, right + 1) + " ");
						//i = right + 1;
					}

				}
				i += 2;
			} else {
				if(is == false) {
					left = i;
					is = true;
				}

			}
		}

	}

}

import java.util.Scanner;

public class Dubstep1 {
	public static void main(String[] args) {

		int ind1 = 0, ind2 = 0;

		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String m = s;

		for (int i = 0; i < s.length(); i++) {

			ind1 = m.indexOf("WUB", i);
			ind2 = m.indexOf("WUB", ind1 + 3);

//			if (ind1 == 0) {
//				m = s.replaceFirst("WUB", "");
//				i--;
//			}
			if (ind2 == ind1 + 3)
				m = s.replaceFirst("WUB", "");
			else //if (ind2 > ind1 + 3)
				{

				m = s.replaceFirst("WUB", " ");

			}

			s = m;

		}

		m= m.trim() ;
		System.out.println(m);
	}

}

import java.util.Scanner;

public class Wub {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner sc = new Scanner (System.in);
		String a = sc.next();

		int  i = 0;
		String x="";
		while(i<a.length()-2){
			//System.out.println(i);

			if(a.substring(i, i+3).equals("WUB")){

				x = x +" ";
				i = i + 3;
			}
				else
				{//System.out.println(i);
					x = x + a.charAt(i);
					i++;
				}

			}
	//System.out.println(x);

		if(a.substring(a.length()-2,a.length()).equals("WUB"))

			System.out.println(x);

		else
			System.out.println(a.substring(a.length()-2,a.length()));

		}

	}

import java.util.*;
public class Dubstep208A {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		String []arr=s.split("WUB", 10);
		for(String a:arr)
			System.out.print(a+" ");
	}

}

//package javaapplication159;

import java.util.Scanner;
//WUBWUBWUBSR
public class JavaApplication159 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        /* String st = s.nextLine();
         System.out.println(st.length());*/
        String str = s.next();
        int indx = 0;
        while (indx<str.length()-3&& str.substring(indx, indx+3).equals("WUB")) {
            indx+=3;
        }
        str = str.substring(indx);
        System.out.println(indx+ " "+str.lastIndexOf("WUB"));
        if(str.lastIndexOf("WUB")!=-1)
             str = str.substring(0,str.lastIndexOf("WUB"));
        while(str.indexOf("WUB")!=-1)
            str = str.substring(0,str.indexOf("WUB")) + " "
                  + str.substring(str.indexOf("WUB")+3);
        while(str.indexOf("  ")!=-1)
            str = str.replaceAll("  ", " ");
        System.out.println(str);
    }
}

import java.util.*;
public class hardwork {
    //http://codeforces.com/problemset/problem/131/B
    //http://codeforces.com/problemset/problem/1/B
      //public static int  count=0;
     // public static int  j=0;
     public static String ff="";
    // public static String re="";
    // public static boolean x=false;
    //http://codeforces.com/problemset/problem/49/A
      public static void main(String[] args) {
       Scanner input =new Scanner(System.in);

       StringTokenizer s1=new StringTokenizer(input.next(),"WUB");
       while(s1.hasMoreTokens()){
           System.out.print(s1.nextToken()+" ");
       }

       System.out.println();
      }}

import java.util.Scanner;

public class Dubstep1 {
	public static void main(String[] args) {

		int ind1 = 0, ind2 = 0;

		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String m = s;

		for (int i = 0; i < s.length(); i++) {

			ind1 = m.indexOf("WUB");
			ind2 = m.indexOf("WUB", ind1 + 3);

//			if (ind1 == 0) {
//				m = s.replaceFirst("WUB", "");
//				i--;
//			}
			if (ind2 == ind1 + 3)
				m = s.replaceFirst("WUB", "");
			else //if (ind2 > ind1 + 3)
				{

				m = s.replaceFirst("WUB", " ");

			}

			s = m;

		}

		m= m.trim() ;
		System.out.println(m);
	}

}

import java.util.Scanner;

public class Draw
{

    public static void main (String[] args) throws java.lang.Exception
    {
        Scanner myScanner = new Scanner(System.in);

        String line = myScanner.nextLine();
        char[] arr = line.toCharArray();

        String res = new String();
        boolean space = false;
        for(int i = 0; i < arr.length; i++){

            if(arr.length-i <= 2){
                res+=arr[i];
            }
            else{
                if(arr[i] == 'W' && arr[i+1] == 'U' && arr[i+2] == 'B'){
                    i+=2;
                    if(res.length() > 0){
                        space = true;
                    }
                }
                else{
                    if(space){
                        res += " ";
                        space = false;
                    }
                    res += arr[i];
                }
            }
        }

        System.out.println(res);

        myScanner.close();
    }
}

import java.util.*;

public class xd {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		System.out.println(remove(s));
	}

	static String remove(String s) {
		String res = "";
		for (int i = 0; i < s.length(); i++) {
			if (i <= s.length()-3 && s.substring(i, i+3).equals("WUB")) {
				i+=2;
			}
			else {
				res+= s.charAt(i);
			}
		}
		return res;
	}
}

import java.util.Scanner;
public class A_Dubstep {
    public static void main(String[] args) {
        Scanner in = new Scanner (System.in);
        String str  = in.next();
        int count = 0;
        for(int i = 0 ; i+2 < str.length() ; i++){
            if(str.charAt(i) == 'W' && str.charAt(i+1) == 'U' && str.charAt(i+2) == 'B') {
                        i += 2;
                        if(count > 0)
                            System.out.print(" ");
            }
            else
            {
                count++;
                System.out.print(str.charAt(i));
            }
        }

        if( str.charAt(str.length()-2) == 'U' && str.charAt(str.length()-3) == 'W' && str.charAt(str.length()-1) == 'B'){
        }
        else{
            System.out.println(str.charAt(str.length() - 2));
            System.out.println(str.charAt(str.length() - 1));
        }
    }
}

/*
 * Code Author: Jayesh Udhani
 * Dhirubhai Ambani Institute of Information and Communication Technology (DA-IICT ,Gandhinagar)
 */
// Input TestCase : WUBWUBWUBWUBJAYESHWUBWUBWUBWUBLOVESWUBWUBWUBWUBWUBWUBWUBXYZWUBWUBWUBWUBWUB
// Input TestCase : WUBZVMJWUBWUBWUBFOIMJQWKNZUBOFOFYCCWUBWUBWUBAUWWUBRDRADWUBWUBWUBCHQVWUBWUBWUBKFTWUBWUBWUBW

import java.io.*;
import java.util.*;

public class maIN {
    public static void main(String args[])
    {
        InputReader in = new InputReader(System.in);
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);
        String str=in.next();
        int l=str.length(),j=0;
        char[] arr=new char[l];
        for(int i=0;i<= l-1;i++)
        {
            if(i+2<=l-1)
            {
                if(str.charAt(i)=='W' && str.charAt(i+1)=='U' && str.charAt(i+2)=='B')
                {
                    if(j>=1)
                    {
                        if(arr[j-1]!=' ')
                        {
                            arr[j]=' ';
                            j++;
                        }
                    }
                    i=i+2;

                }
                else
                {
                    arr[j]=str.charAt(i);
                    j++;
                }
            }
            else
            {
                arr[j]=str.charAt(i);
                j++;
            }

        }
        int i;
        for( i=arr.length-1;arr[i]==' ';i--)
        {

        }
        arr[i]='\0';
        //  arr.toString();
        //  System.out.println(arr);
        //  System.out.println(str.length()+" "+arr.length);
        for(int t=0;arr[t]!='\0';t++)
            System.out.print(arr[t]);

        out.close();
    }
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream inputstream) {
            reader = new BufferedReader(new InputStreamReader(inputstream));
            tokenizer = null;
        }

        public String nextLine(){
            String fullLine=null;
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    fullLine=reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
                return fullLine;
            }
            return fullLine;
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
    }

}

import java.util.Scanner;

public class Dubstep {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		scan.close();
		String ans = "";
		for (int i = 0; i < str.length(); i++) {
			if (str.charAt(i) == 'W' && str.charAt(i + 1) == 'U' && str.charAt(i + 2) == 'B') {
				ans += " ";
				i += 2;
			} else {
				ans += str.charAt(i);
			}
		}
		String ans2 = "";
		for (int i = 0; i < ans.length() - 1; i++) {
			if (ans.charAt(i) != ' ' && ans.charAt(i + 1) != ' ') {
				ans2 += ans.charAt(i);
			} else if (ans.charAt(i) == ' ' && ans.charAt(i + 1) != ' ') {
				ans2 += ans.charAt(i);
			} else if (ans.charAt(i) != ' ' && ans.charAt(i + 1) == ' ') {
				ans2 += ans.charAt(i);
			}
		}
		ans2 += ans.charAt(ans.length() - 1);
		for (int i = 1; i < ans2.length(); i++) {
			System.out.print(ans2.charAt(i));
		}

	}

}

import java.util.Scanner;

public class Dubstep
{

    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        String input = in.next();

        String output ="";

        for ( int i=0  ; i<input.length()-2; i++)
        {

            if (input.charAt(i)=='W'&&input.charAt(i++)=='U'&&input.charAt(i+2)=='B')
            {
              output=input.replaceAll(input.substring(i, i+3), " ");
            }
            if (!input.contains("WUB"))
            {
                output = input ;
            }

       }
        if ( input.length()<3)
            System.out.println(input);

        else
        System.out.println(output);
    }

}

import java.util.Scanner;
import static java.lang.Math.abs;
import static java.lang.Math.min;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String word;
        int space = 1;
        char w;
        char newWord[];
        word = scanner.next();
        //        for (int j=0; j<200 ;j++) {
        //            arr[j] = scanner.nextInt();
        //        }
        for (int i = 0; i < word.length(); i++) {
            if (word.charAt(i) == 'W' && word.charAt(i + 1) == 'U' && word.charAt(i + 2) == 'B') {
                i += 2;
                if (space==1){
                    System.out.print(" ");
                }
            } else {
                space=0;
                System.out.print(word.charAt(i));
            }
        }
    }
}

import java.util.Scanner;

/**
 * Created by Baka on 04.05.2016.
 */
public class Dubstep {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] charArray = scanner.nextLine().toCharArray();

        StringBuilder stringBuilder = new StringBuilder();
        int wubs = 0;
        for (int i = 0; i < charArray.length; i++){

            if (i != charArray.length - 2 && i != charArray.length - 1 && charArray[i] == 'W'){
                if (charArray[i+1] == 'U' && charArray[i+2] == 'B'){
                    wubs++;
                    i+=2;
                    continue;
                }
                stringBuilder.append(charArray[i]);
                wubs=0;
            } else {
                if (wubs > 0){
                    stringBuilder.append(' ');
                    wubs = 0;
                }
                stringBuilder.append(charArray[i]);
            }
        }

        System.out.println(stringBuilder.toString().trim());
    }

}

import java.util.*;
public class mashy {

	public static boolean wub(String x){
			if(x.charAt(0)== 'W' && x.charAt(1)== 'U' && x.charAt(2)== 'B')
						return true;
			return false;
	}

    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
		String x = sc.nextLine();
		String a ="";
		boolean flag = false;
		int y ;
		y = x.length()%3;

		for(int i =0; i<x.length()-2;i+=3){
			for(;wub(x.substring(i,i+3))!= true && i<x.length()-3;i++){
				a = a + x.charAt(i);
				flag = true;
			}
			if(flag ){
				if(i==x.length()-3){

					break;}
			    flag = false;
				a = a + " ";

	}
	}
		if(flag && y!=0 && wub(x.substring(x.length()-3)) == false){
			for(int i=x.length()-3;i<x.length();i++)
				a = a + x.charAt(i);

		}
		else if(y!=0 && wub(x.substring(x.length()-3)) == false)
			for(int i=x.length()-y;i<x.length();i++)
				a = a + x.charAt(i);

	System.out.print(a);
}}

import java.util.Scanner;

public class A_Dubstep {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String ans = in.next();
        int exe = 1;
        String ret = new String();
        for(int i=0;i<ans.length()-2;i++)
        {
            if(ans.charAt(i)=='W' && ans.charAt(i+1)=='U' && ans.charAt(i+2)=='B'){
                i+=2;
                exe = 0;
            }
            else{
                if(exe++ == 0)
                    ret = ret.concat(" ");
                ret = ret + ans.charAt(i);
            }
        }
        System.out.println(ret);
    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String in = sc.next();
        for(int i = 0 ; i < in.length() - 3 ;){
            if(in.charAt(i) == 'W' && in.charAt(i + 1) == 'U' && in.charAt(i + 2) == 'B'){
                i += 3;
                System.out.print(" ");
            }else{
                System.out.print(in.charAt(i));
                i++;
            }
        }
        sc.close();
    }

}

import java.util.Scanner;

public class Dubstep1 {
	public static void main(String[] args) {

		int ind1 = 0, ind2 = 0;

		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String m = s;

		for (int i = 0; i < s.length(); i++) {

			ind1 = m.indexOf("WUB", i);
			ind2 = m.indexOf("WUB", ind1 + 3);

//			if (ind1 == 0) {
//				m = s.replaceFirst("WUB", "");
//				i--;
//			}
			if (ind2 == ind1 + 3)
				m = s.replaceFirst("WUB", "");
			else //if (ind2 > ind1 + 3)
				{

				m = s.replaceFirst("WUB", " ");

			}

			s = m;

		}

		m= m.trim() ;
		System.out.println(m);
	}

}

import java.util.Scanner;

public class JavaApplication41 {
    public static void main(String[] args) {
    Scanner in=new Scanner(System.in);
    String s=in.nextLine();
    String s1="";
    int i=0;
    while(i<s.length()-1)
    {
        if(s.charAt(i)=='W'&&s.charAt(i+1)=='U'&&s.charAt(i+2)=='B')
        {i=i+3;
            continue;
        }
        else
        {s1+=s.charAt(i);
        i++;
        }

    }
    System.out.println(s1);

}
}

import java.util.Scanner;

public class Codefor {

  public static void main(String[] args) {
      int i=0 ,j=0,k=0;
      char word2 [] = new char[200];
      Scanner sc = new Scanner(System.in);
      String word = sc.nextLine();
      char wub [] = {'W','U','B'} ;
      word = word.toUpperCase();
      char arr[] = word.toCharArray();
      while(i!=arr.length)
      {
         if( arr[i]==wub[j] )
         {

             if(k>0 && i+3 !=arr.length)
              word2[k]=' ';
                while(arr[i]==wub[j] && arr[i+1]==wub[j+1] && arr[i+2]==wub[j+2]  )
              {

              //  j++;
                 i=i+3;
                if(i==arr.length)
                    break;
               // if(j>1)
                     j=0;

              }

         }

            if(i==arr.length)
                break;
            k++;
            word2[k]=arr[i];
            k++;
            i++;
        }
      for(i=0 ; i!=word2.length ; i++)
          System.out.print(word2[i]);

  }
}

//package javaapplication159;

import java.util.Scanner;
//WUBWUBWUBSR
public class JavaApplication159 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        /* String st = s.nextLine();
         System.out.println(st.length());*/
        String str = s.next();
        int indx = 0;
        while (indx<str.length()-3&& str.substring(indx, indx+3).equals("WUB")) {
            indx+=3;
        }
        str = str.substring(indx);
        //System.out.println(indx+ " "+str.lastIndexOf("WUB"));
        if(str.lastIndexOf("WUB")!=-1)
             str = str.substring(0,str.lastIndexOf("WUB"));
        while(str.indexOf("WUB")!=-1)
            str = str.substring(0,str.indexOf("WUB")) + " "
                  + str.substring(str.indexOf("WUB")+3);
        while(str.indexOf("  ")!=-1)
            str = str.replaceAll("  ", " ");
        System.out.println(str);
    }
}