using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            StringBuilder input = new StringBuilder(Console.ReadLine());

            input.Replace("WUB", " ");

            string result = String.Join(" ", input.ToString().Split(' ').Where(x => !x.Equals(String.Empty)).ToList());

            Console.WriteLine(result);

            //Console.ReadKey();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ca208A
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(Console.ReadLine().Replace("WUB", " ").Trim());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;

public static class Dubstep
{
    private static void Solve()
    {
        string str = Read();
        var separators = new string[] { "WUB" };
        string[] output = str.Split(separators, StringSplitOptions.None);

        Write(string.Join(" ", output));
    }

    #region Main

    private static TextReader reader;
    private static TextWriter writer;
    public static void Main()
    {
#if DEBUG
        //reader = new StreamReader("C:\\Users\\Axel\\Desktop\\input.txt");
        reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            Solve();
            //var thread = new Thread(new Dubstep().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string Read() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(Read()); }
    public static long ReadLong() { return long.Parse(Read()); }
    public static double ReadDouble() { return double.Parse(Read(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }
        return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array) writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }
    #endregion
}

using System;

namespace AllProblems
{
    class Program
    {
        static void Main(string[] args)
        {
            _208A_Dubstep.Run();

        }
    }
    class _208A_Dubstep
    {
        public static void Run()
        {
            var s = Console.ReadLine();
            var len = s.Length;
            var ind = 0;

            var first = true;

            while (ind < len)
            {
                if (len-ind > 2 && s.Substring(ind, 3) == "WUB") ind += 3;
                else
                {
                    var nInd = s.IndexOf("WUB", ind, StringComparison.Ordinal);

                    var w = s.Substring(ind, nInd > -1? nInd - ind : len - ind);

                    if (first) first = false;
                    else Console.Write(" ");
                    Console.Write(w);

                    ind = nInd > -1 ? nInd:len;
                }
            }

            Console.WriteLine();
            Console.ReadLine();
        }
    }
}

using System;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;

namespace Algo
{
   class Program
   {
      static void Main()
      {
         //Console.SetIn(File.OpenText(@"C:\Users\user\Documents\Visual Studio 2015\Projects\Algo\Algo\input.txt"));

         string str = Console.ReadLine();

         string[] chop = str.Split(new string[]{ "WUB" }, StringSplitOptions.RemoveEmptyEntries);

         Console.WriteLine(string.Join(" ", chop));
      }
   }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep___Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] separator = new string[]{"WUB"};
            string[] temp = s.Split(separator, StringSplitOptions.None);

            for (int i = 0; i < temp.Length; i++)
            {
                Console.Write(temp[i] + " ");
            }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string dub="WUB";
            string song = Console.ReadLine();
            string e = ""; int i = 0, k = 0;
            song = "WUB" + song + "WUB";
            while (song[i] == dub[0] && song[i + 1] == dub[1] && song[i + 2] == dub[2]) i += 3;
            while (i<song.Length)
            {
                 k = 0;
                 while (i < (song.Length-2) && song[i] == dub[0] && song[i + 1] == dub[1] && song[i + 2] == dub[2])
                    {
                        k = 1;
                        i += 3;
                    }
                if (k == 1) e += " ";
                else
                 {
                     e += song[i];
                     i++;
                 }

              }

            Console.WriteLine(e);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _208A
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            s=s.Replace("WUB", " ");
            s=new string(s.SkipWhile(el => el == ' ').Reverse().SkipWhile(el => el == ' ').Reverse().ToArray());
            Console.WriteLine(s);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            if (!s.Contains("WUB"))
            {
                Console.WriteLine(s);
                return;
            }
            string[] k = {"WUB"};
            var ans = s.Split(k,StringSplitOptions.RemoveEmptyEntries);
            for(int i=0;i<ans.Length;i++)
            {
                Console.Write(ans[i]+' ');
            }
        }
    }
}

using System;
using System.Text;

namespace CodeForces
{
    class Program
    {

        private static void DubStep()
        {
            string input = Console.ReadLine();
            input = input.Replace("WUB", " ");
            input =input.Trim();
            string output=null;
            StringBuilder builder=new StringBuilder();
            for (int i = 0; i < input.Length; i++) // this loop not working for 1 word inputs ...
            {
                if (input[i] != ' ') builder.Append(input[i]);
                else if (builder[builder.Length - 1] != ' ') builder.Append(input[i]);
            }
            output = builder.ToString();
            Console.WriteLine(output);
        }

        static void Main(string[] args)
        {
            DubStep();

        }
    }
}

using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace testCSH1
{
    class Program
    {
        static void Main(string[] args)
        {
            String str = Console.ReadLine();
            int[] arr = new int[str.Length];
            for (int i = 0; i < str.Length; i++)
            {
                arr[i] = 0;
            }
            int index = 0;
            for (int i = 0; i < str.Length; i++)
            {
                index = str.IndexOf("WUB", i);
                if (index == i) {
                    arr[i] = 1;
                    arr[i+1] = 1;
                    arr[i+2] = 1;
                    i += 2;
                }
            }
            bool isStart = true;
            bool isNewWord = true;
            for (int i = 0; i < str.Length; i++)
            {
                if (arr[i] == 1)
                {
                    isNewWord = true;
                }
                else {
                    if (isNewWord)
                    {
                        if (isStart)
                        {
                            Console.Write(str[i]);
                            isNewWord = false;
                            isStart = false;
                        }
                        else
                        {
                            Console.Write(" " + str[i]);
                            isNewWord = false;
                        }
                    }
                    else {
                        Console.Write(str[i]);
                    }
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace dub_regex
{
    class Program
    {
        static void Main(string[] args)
        {
            string the_words = "",line = Console.ReadLine();
            line = Regex.Replace(line,"WUB"," ");
         string[]  new_line = Regex.Split(line, " ");
         foreach (string word in new_line)
         {
             if (word != " " && word!="")
             {
                 the_words += word + Convert.ToString(" ");
             }
         }
         Console.WriteLine(the_words);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace Rextester
{
    public class Program
    {
        public static void Main(string[] args)
        {
            string a = Console.ReadLine();
            for (int i = 0; i < a.Length - 2; i++)
            {

                if (a[i] == 'W' && a[i + 1] == 'U' && a[i + 2] == 'B')
                {
                    a = a.Insert(i, " ");
                    a = a.Remove(i + 1, 3);
                    if (i != 0 && a[i - 1] == ' ')
                        a = a.Remove(i, 1);
                    i--;
                }
            }
            Console.WriteLine(a.Trim());
        }
    }
}

using System;
using System.Linq;
using System.Text;
using System.Threading;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            var line = Console.ReadLine().Replace("WUB", " ").Trim();

            var sb = new StringBuilder();
            var previousLetterIsWhiteSpace = false;
            foreach (var letter in line)
            {
                if (char.IsWhiteSpace(letter))
                {
                    if (!previousLetterIsWhiteSpace)
                        sb.Append(letter);

                    previousLetterIsWhiteSpace = true;
                }
                else
                {
                    sb.Append(letter);
                    previousLetterIsWhiteSpace = false;
                }
            }

            Console.WriteLine(sb.ToString());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            Console.WriteLine(s.Replace("WUB", " ").Trim());
            Console.ReadLine();
        }
    }
}

using System;
using System.Linq;
using System.Text.RegularExpressions;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            String Wub = Console.ReadLine();
            Wub = Wub.Replace("WUB", " ");
            String[] Ok = Regex.Split(Wub, @"\s+");
            Wub = String.Join(" ",Ok);
            Console.WriteLine(Wub.Trim());
        }
    }
}

using System;

    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(String.Join(" ",Console.ReadLine().Split(new[] { "WUB" } , StringSplitOptions.RemoveEmptyEntries)));
        }
    }

using System;
using System.Linq;
using System.Text.RegularExpressions;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            String Wub = Console.ReadLine();
            Wub = Wub.Replace("WUB", " ");
            //String[] Ok = Regex.Split(Wub, @"\s+");
            //Wub = String.Join(" ",Ok);
            Console.WriteLine(Wub);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace _208A
{
    class Program
    {
        static void Main(string[] args)
        {

         string pattern = @"WUB";

             string inputData = Console.ReadLine().Trim();

             string result;
            result = inputData.Replace(pattern," ");
             Console.WriteLine(result.Trim());

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//using System.Threading.Tasks;

namespace codeforces
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
           string res2 = s.Replace("WUB"," ");
           Console.WriteLine(res2.Trim());

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication73
{
    class Program
    {
        static void Main(string[] args)
        {
            var a = Console.ReadLine().Split(new string[] {"WUB"}, StringSplitOptions.RemoveEmptyEntries);
            Console.WriteLine(string.Join(" ",a));
        }
    }
}

using System;
using System.Numerics;
namespace WatermelonC
{
    class Program
    {
        static void Main(string[] args)
        {
            string dubstep = Console.ReadLine();
            string original = "";
            original = dubstep.Replace("WUB", " ");
            for (int i = 0; i < original.Length - 1; i++)
            {
                if (original[i] == ' ' && original[i + 1] == ' ')
                    original = original.Remove(i, 1);
            }

            if (original[0] == ' ')
                original = original.Remove(0, 1);
            if (original[original.Length - 1] == ' ')
                original = original.Remove(original.Length - 1);

            Console.WriteLine(original);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace codeforces {
    class Program {
        static void Main(string[] args) {
            Console.WriteLine(Console.ReadLine().Replace("WUB"," ").Trim().Replace("  "," "));
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {

            string rt = Console.ReadLine();

            Console.WriteLine( rt.Replace("WUB", " ").Trim());

        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string songRemax = Console.ReadLine();
            string song=null;
            bool check = false;
            for (int i = 0; i < songRemax.Length; i++)
            {
                if(songRemax[i]=='W')
                {
                    for (int K = i,n=0; n < 3 ; K++,n++)
                    {
                        if (K < songRemax.Length)
                        {
                            if (songRemax[K] == 'W' && n == 0)
                            {
                                continue;
                            }
                            if (songRemax[K] == 'U' && n == 1)
                            {
                                continue;
                            }
                            if (songRemax[K] == 'B' && n == 2)
                            {
                                if (song != null)
                                {
                                    song += " ";
                                }
                                i += 2;
                                check = true;
                            }
                            else
                                break;
                        }
                        else
                            break;
                    }
                    if (check)
                    {
                        check = false;
                        continue;
                    }
                    else
                    {
                        song += Convert.ToString(songRemax[i]);
                    }
                }
                else
                {
                    song += Convert.ToString(songRemax[i]);
                }
            }
            Console.WriteLine(song);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CF_208A
{
    class Program
    {
        public string WordOfSong2(string inp)
        {
            string res = "";
            int len = inp.Length;
            if (len < 3) return inp;
            else
            {
                int[] flags = new int[len];
                bool bwub = (inp[0] == 'W') && (inp[1] == 'U') && (inp[2] == 'B');
                int wubst = 0;
                int wubf = 0;
                int i;
                if (bwub)
                {
                    i = 3;
                    for (int j = 0; j < 3; j++)
                        flags[j] = 1;
                }
                else
                    i = 0;
                while (i < len - 3)
                {
                    wubst = i;
                    wubf = i;
                    bwub = (inp[i] == 'W') && (inp[i + 1] == 'U') && (inp[i + 2] == 'B');
                    while ((bwub == true) && (i < len - 3))
                    {
                        bwub = (inp[i] == 'W') && (inp[i + 1] == 'U') && (inp[i + 2] == 'B');
                        if (bwub)
                        {
                            i = i + 3;
                            wubf = wubf + 3;
                        }
                    }
                    if (wubf - wubst != 0)
                    {
                        for (int j = wubst; j < wubf; j++)
                        {
                            flags[j] = 1;
                        }
                    }
                    i++;
                }
                bool bend = (inp[len - 3] == 'W') && (inp[len - 2] == 'U') && (inp[len - 1] == 'B');
                if (bend)
                    for (int j = len - 3; j < len; j++) flags[j]++;
                bool bstart = true;
                bool bcons = false;
                for (int j = 0; j < len; j++)
                {
                    if (flags[j] == 0)
                    {
                        res = res + inp[j];
                        bstart = false;
                        bcons = false;
                    }
                    if (flags[j] == 1 && !bstart && !bcons)
                    {
                        res = res + " ";
                        bcons = true;
                    }
                }
              //  for (int j = 0; j < len; j++)
              //      Console.WriteLine(flags[j].ToString() + " ");
                return res;
            }
        }
        static void Main(string[] args)
        {
            Program el = new Program();
            string inp = Console.ReadLine();
            //string res = el.WordsOfSong("WUBWUBWUBSR");
            Console.WriteLine(el.WordOfSong2(inp));
            //Console.WriteLine(el.WordOfSong2("A"));
            //Console.ReadKey();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace comp
{
    class Program
    {

        static void Main(string[] args)
        {
            string a = "";
            a = Console.ReadLine();
           // string a = "WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB";
            a = a.Replace("WUB", " ");
            Console.WriteLine(a) ;

        }
    }
}

using System;
using System.IO;
using System.Text;

namespace Dubstep
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            string s = reader.ReadLine();

            s = s.Replace("WUB", " ").Trim();

            writer.WriteLine(s);
            writer.Flush();
        }
    }
}

  using System;

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            while (a.Contains("WUB"))
            {
                a = a.Replace("WUB", " ");
                a = a.Replace("  ", " ");
            }
            Console.WriteLine(a.Trim());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {

        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            string SORT = str.Replace("WUB", " ");
            SORT = SORT.Trim();
            SORT = Regex.Replace(SORT, "[ ]+", " ");
            Console.WriteLine(SORT);
            Console.Read();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace DubStep
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            //string s1 = "WUB";
            string s1=s.Replace("WUB", " ");
            s1 = Regex.Replace(s1, @"\s+", " ");

            Console.WriteLine(s1);
            Console.ReadLine();

        }
    }
}

using System;

namespace Number208A {
    class Program {
        static void Main(string[] args) {
            var mas = Console.ReadLine().Split(new[] { "WUB" }, StringSplitOptions.RemoveEmptyEntries);
            for(Int32 i = 0; i < mas.Length; i++) {
                Console.Write(mas[i]);
                if(i != mas.Length - 1)
                    Console.Write(" ");
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace _208A
{
    class Program
    {
        private static string[] s1;

        static void Main(string[] args)
        {
            var s = Console.ReadLine();
            s1 = Regex.Split(s, "WUB");
            StringBuilder res = new StringBuilder();
            foreach(string val in s1)
            {
                if(val != "")
                {
                    res.Append(val + " ");
                }
            }
            Console.WriteLine(res.Remove(res.Length - 1, 1));
        }
    }
}

using System;
using System.Text.RegularExpressions;

namespace www
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string p = s + "jj";
            string f = "";
            for (int i = 0; i < p.Length; i++)
            {
                if (i + 2 < p.Length)
                {
                    if (p[i] == 'W')
                    {
                        if (p[i + 1] == 'U')
                        {
                            if (p[i + 2] == 'B')
                            {
                                i = i + 2;
                                f = f + " ";
                            }
                            else
                            {
                                f = f + p[i];
                            }
                        }
                        else
                        {
                            f = f + p[i];
                        }
                    }
                    else
                    {
                        f = f + p[i];
                    }
                }

            }
            string v = new Regex(@"\s+").Replace(f, " ");
            string[] h = f.Split();
            string z = "";
            string u = "";
            for (int i = 0; i < h.Length; i++)
            {
                z = z + h[i] + " ";
            }
            int x = 0;
            for (int i = 0; i < v.Length; i++)
            {
                if (v[i] !=' ')
                {
                    x = 1;
                }
                if (x == 1)
                {
                    u = u + v[i];
                }
            }
            Console.WriteLine(u);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Дабстеп
{
    class Program
    {
        static void Main(string[] args)
        {
            string line = Console.ReadLine();
            string result = line.Replace("WUB", " ");
            string result1 = result.Replace("  ", " ");
            string result2 = result1.TrimStart(' ');
            string result3 = result2.TrimEnd(' ');

            Console.WriteLine(result3);
           // Console.WriteLine(line.Replace("WUB"," "),line.TrimStart(' '),line.TrimEnd(' '));

           // Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
using System.IO;
using System.Numerics;

namespace probleme {
    class Program {
        static void Main(string[] args) {
            string s = Console.ReadLine().Replace("WUB", " ");
            int st = 0;
            while (s[st] == ' ')
                st++;
            int dr = s.Length - 1;
            while (s[dr] == ' ')
                dr--;
            for (int i = st; i <= dr; i++)
                Console.Write(s[i]);
         //   Console.ReadKey();
        }
    }
}

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;

namespace CSharpOlympTasks
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = String.Join(" ", Console.ReadLine().Replace("WUB", " ").Split(' ').Where(e => e != string.Empty));
            Console.WriteLine(s);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace vjudge
{
    class Program
    {
        static void Main(string[] args)
        {
            Lable1:

            string str = Console.ReadLine();

            string rsult = str.Replace("WUB", " ").Trim();

            Console.WriteLine(rsult);

            //Console.ReadLine();
            //goto Lable1;
        }

    }

}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
namespace ConsoleApplication180
{
    class Program
    {
        static void Main(string[] args)
        {
            string f = Console.ReadLine();
            string[] h = Regex.Split(f, "WUB");
            for (int i = 0; i < h.Length; i++)
            {
                Console.Write(h[i]+" ");
            }
            Console.WriteLine();

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication45
{
    class Program
    {
        static void Main(string[] args)
        {
            string x = Console.ReadLine().ToUpper();
            string y = x.Replace("WUB", " ");

            Console.WriteLine(y);

        }
    }
}

using System;

namespace _208A
{
    class Program
    {
        static void Main()
        {
            var input = Console.ReadLine();
            Console.WriteLine(input.Replace("WUB", " ").Trim());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = "";
            for (int i = 0; i < s.Length; i++)
            {
                if (i < s.Length - 2 && s[i] == 'W' && s[i + 1] == 'U' && s[i + 2] == 'B')
                {
                    if (s1 != "" && s1[s1.Length - 1] != ' ') s1 += ' ';
                    i += 2;
                }
                else s1 += s[i];
            }
            Console.WriteLine(s1);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace CF_DubStep
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            s = Regex.Replace(s.Replace("WUB", " ").TrimEnd().TrimStart(), @"\s+", " ");
            Console.WriteLine(s);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine().Replace("WUB"," ");
            Console.WriteLine(a.Trim());

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CFTraining.A_s
{
    class Dubstep130
    {
        static void Main(string[] args)
        {
            string dubstep = Console.ReadLine(), original = "";
            bool metWub = false;
            for (int i = 0; i < dubstep.Length; i++)
            {
                if (i + 2 < dubstep.Length && dubstep.Substring(i, 3).Equals("WUB"))
                {
                    metWub = true;
                    i += 2;
                }
                else
                {
                    if (metWub && original.Length > 0) original += " ";
                    original += dubstep[i];
                    metWub = false;
                }
            }
            Console.WriteLine(original);
        }
    }
}

using System;
using System.Linq;

namespace _123
{
    class Program
    {
        static void Main()
        {
            string wub = Console.ReadLine();
            wub = wub.Replace("WUB", " ").Replace("  ", " "); ;
            if (wub.StartsWith(" ")) wub = wub.Remove(0, 1);
            if (wub.EndsWith(" ")) wub = wub.Remove(wub.Length - 1);
            Console.WriteLine(wub);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Contesa
{
    class Program
    {
        static void Main(string[] args)
        {
            string Song = Console.ReadLine();
            Song = Song.Replace("WUB", " ");
            Console.WriteLine(Song.TrimStart());

        }

    }
}

using System;
class Dubstep
{
    static void Main()
    {
        string s = Console.ReadLine();
        while(s.IndexOf("WUB") != -1)
        {
            s = s.Replace("WUB", " ");
        }

        s.Trim();

        while(s.IndexOf("  ") != -1)
        {
            s = s.Replace("  ", " ");
        }

        Console.Write(s.Trim());
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _13july
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            if (a.Contains("WUB"))
            {
                string y = a.Replace("WUB", " ");
                Console.WriteLine(y);
            }
            else
            {
                Console.WriteLine(a);
            }

        }
    }
}

using System;

namespace A.Dubstep__208_A
{
    class Program
    {
        static void Main(string[] args)
        {

            string song = Console.ReadLine();
            Console.WriteLine(ReturnToOriginals(song));
        }

        public static string ReturnToOriginals(string song)
        {
            song += "WUB";
            string songLyrics = "";
            string tempWord = "";
            for (int i = 0; i < song.Length - 2; i++)
            {
                if (song[i] == 'W' && song[i + 1] == 'U' && song[i + 2] == 'B')
                {

                    i = i + 2;//Jump a word(WUP)
                    if (tempWord != "")
                    {
                        songLyrics += (tempWord + " ");
                        tempWord = "";
                    }
                }
                else if (i == song.Length - 2)
                {

                }
                else
                {
                    tempWord += song[i];

                }
            }
            return songLyrics.Trim();
        }
    }
}

using System;

namespace stringx
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            s = s.Replace("WUB", " ").Trim();
            string[] sa = s.Split(' ');
            s = null;
            foreach(string ss in sa){
                if (ss.Trim(' ') != null) Console.Write(ss +" ");
            }
        }
    }
}

using System;

class dubstep {
	public static void Main() {
		var s = Console.ReadLine().ToCharArray();
		var 新串长度 = 0;
		for (int i = 0; i < s.Length;) {
			if (i + 2 < s.Length &&
			    s[i] == 'W' && s[i + 1] == 'U' && s[i + 2] == 'B') {
				if (新串长度 != 0 && s[新串长度 - 1] != ' ') {
					++新串长度;
					s[新串长度 - 1] = ' ';
				}
				i += 3;
			} else {
				++新串长度;
				s[新串长度 - 1] = s[i];
				++i;
			}
		}
		if (s[新串长度 - 1] == ' ') --新串长度;
		Console.WriteLine(new string(s, 0, 新串长度));
	}
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace CodeforcesProblem
{
    class Program
    {
        static void Main(string[] args)
        {

            var input = GetStringInputFromLine();
            input= input.Replace("WUB", " ");
            Console.WriteLine(input);

        }
        static int GetIntegerInputFromLine()
        {
            var input = Convert.ToInt32(Console.ReadLine().Trim());
            return input;
        }

        static int[] GetIntegerInputsFromLine()
        {
            var inputs = Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x.Trim())).ToArray();
            return inputs;
        }

        static long GetLongInputFromLine()
        {
            var input = Convert.ToInt64(Console.ReadLine().Trim());
            return input;
        }

        static long[] GetLongInputsFromLine()
        {
            var inputs = Console.ReadLine().Split(' ').Select(x => Convert.ToInt64(x.Trim())).ToArray();
            return inputs;
        }

        static double GetDoubleInputFromLine()
        {
            var input = Convert.ToDouble(Console.ReadLine().Trim());
            return input;
        }

        static double[] GetDoubleInputsFromLine()
        {
            var inputs = Console.ReadLine().Split(' ').Select(x => Convert.ToDouble(x.Trim())).ToArray();
            return inputs;
        }

        static string GetStringInputFromLine()
        {
            var input = Console.ReadLine();
            return input;
        }

        static string[] GetStringInputsFromLine()
        {
            var inputs = Console.ReadLine().Split(' ');
            return inputs;
        }
    }
}

using System;

namespace A.Дабстеп
{
    class Program
    {
        static void Main(string[] args)
        {
            string st = Console.ReadLine();
            bool space = false;
            for (int i = 0; i < st.Length; i++)
            {
                if (i + 2 < st.Length)
                {
                    if (st[i] == 'W' && st[i + 1] == 'U' && st[i + 2] == 'B')
                    {
                        if (space == true)
                        {
                            Console.Write(" ");
                            space = false;
                        }
                        i = i + 2;
                    }
                    else
                    {
                        Console.Write(st[i]);
                        space = true;
                    }
                }
                else
                {
                    Console.Write(st[i]);
                    space = true;
                }
            }
            Console.WriteLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string ans = "";
            string input = Console.ReadLine();
            int stage = 0;
            for (int i = 0; i < input.Length; i++)
            {
                if (stage == 0)
                {
                    if (input[i] == 'W')
                        stage = 1;
                    else
                    {
                        ans += input[i];
                        stage = 0;
                    }
                }
                else if (stage == 1)
                {
                    if (input[i] == 'U')
                        stage = 2;
                    else if (input[i] == 'W')
                    {
                        stage = 1;
                        ans += "W";
                    }
                    else
                    {
                        ans += "W" + input[i];
                        stage = 0;
                    }
                }
                else if (stage == 2)
                {
                    if (input[i] == 'B')
                    {
                        stage = 0;
                        ans = ans + " ";
                    }
                    else if (input[i] == 'W')
                    {
                        stage = 1;
                        ans += "WU";
                    }
                    else
                    {
                        ans += "WU" + input[i];
                        stage = 0;
                    }
                }
            }
            if (stage == 1)
                ans += "W";
            if (stage == 2)
                ans += "WU";

            Console.WriteLine(ans);
            Console.ReadLine();
        }
    }
}

using System;

namespace _208A_Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();

           str = str.Replace("WUB", " ").Trim().Replace("  ", " ");

            Console.WriteLine(str);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace work
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            string wub = "WUB";
            string song = "";
            int i = 0;
            int len = str.Length;

            while (str.Length -i>wub.Length)
            {
                if (wub == str.Substring(i, 3))
                {
                    i += 3;
                }
                else
                {
                    while (str.Length - i >= wub.Length && str.Substring(i, 3) != wub)
                    {
                        if (str.Length - i >= 3)
                        {
                            song += str.Substring(i, 1);
                            i++;
                        }
                        else
                        {
                            break;
                        }
                    }
                    song += " ";
                }
            }

            int q = str.Length - i;

            if (song.Length>0 && q == 2 && str.Substring(str.Length-5,3)!=wub)
            {
                song = song.Substring(0, song.Length - 1);
                song += str.Substring(i, q);
            }
            else
            {
                if (str.Substring(i, q) != wub)
                {
                        song += str.Substring(i, q);
                }
            }
            Console.WriteLine(song);
        }
    }
}

using System;

namespace CF_Dubstep {
    class Program {
        static void Main(string[] args) {
            string input = Console.ReadLine();
            input = input.Replace("WUB", "+");
            string[] inputs = input.Split('+');
            foreach(var s in inputs) {
                if (s != "") {
                    Console.Write(s + " ");
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine(), res="";
            int i;
            bool newword=false;
            for (i = 0; i < s.Length; i++)
            {
                if (s.Length-i>2 && s[i] == 'W' && s[i + 1] == 'U' && s[i + 2] == 'B')
                {
                    i += 2;
                    if(res!="")
                    newword = true;
                }
                else
                {
                    if (newword == true)
                    {
                        res += ' ';
                        res+=s[i];
                        newword = false;
                    }
                    else
                        res += s[i];

                }
            }
            Console.WriteLine(res);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            int n;
            string s = Console.ReadLine();
            string res = "";
            char[] mas = new char[3] { 'W', 'U', 'B'};
            int j = 0;
            bool flag = false;
            n = s.Length;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] == mas[j])
                {
                    j++;
              //      flag = false;
                }
                else
                {
                    if (s[i] == 'W' && j != 0)
                    {
                        j = 1;
                        flag = true;
                    }
                    else
                    {
                        j = 0;
                        flag = true;
                    }
                }
                if (j == 3)
                {
                    j = 0;
                    s = s.Remove(i-2, 3);
                    if (flag)
                    {
                        s = s.Insert(i - 2, " ");
                        i++;
                    }
                    //else
                        if (i > 2)
                        i -= 3;
                    else
                        i = -1;
                    flag = false;
                    n = s.Length;
                }
            }
            Console.WriteLine(s);
          //  Console.ReadKey();
            //  Console.WriteLine(string.Join(", ", primeNumbers));
            // Console.ReadLine();
            //   var line = Console.ReadLine().Split(new[] { ' ' });

        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;

public class Program
{
	public static void Main()
	{
		string s = Console.ReadLine();
		string ans = string.Empty;
		List<string> ls = new List<string>();
		s = s.Replace("WUB", " ");
		s.Trim();
		s = s.Replace(' ', '*');
		for(int i = 0; i < s.Length; i++)
		{
			if(s[i] == '*')
			{
				if(ans.Length > 0) ls.Add(ans);
				ans = string.Empty;
				continue;
			}
			else
			{
				ans += s[i];
			}
		}
		if(ans.Length > 0) ls.Add(ans);
		StringBuilder sb = new StringBuilder();
		foreach(string t in ls)
		{
			sb.Append(" " + t);
		}
		ans = sb.ToString();
		ans = ans.Trim();
		Console.WriteLine(ans);
	}
}

using System;
using System.Text;
using System.ComponentModel;
using System.Linq;

namespace DubStep
{
    class Program
    {
        static void Main()
        {
            string dj = Console.ReadLine();
            dj = dj.Replace("WUBWUBWUB", " ");
            dj = dj.Replace("WUBWUB", " ");
            dj = dj.Replace("WUB", " ");

            if (dj[0].Equals(" "))
            {
                dj = dj.Remove(0, 1);
            }

            if (dj[dj.Length-1].Equals(" "))
            {
                dj = dj.Remove(dj.Length - 1, 1);
            }

            Console.WriteLine(dj);
        }
    }
}

using System;
using System.Text;

public class Test
{
	public static void Main()
	{
		StringBuilder sb = (new StringBuilder(Console.ReadLine())).Replace("WUB", " ");
		int len = sb.Length;
		do
		{
			len = sb.Length;
			sb.Replace("  ", " ");
		} while(len != sb.Length);
		Console.WriteLine(sb.ToString().Trim());
	}
}

using System;
using System.Text;
 class Program
    {
        static void Main(string[] args)
        {
            string[] sep = { "WUB" };
            string[] input = Console.ReadLine().Split(sep, StringSplitOptions.RemoveEmptyEntries);
            StringBuilder bldr = new StringBuilder();
            for (int i = 0; i < input.Length; ++i)
                bldr.AppendFormat("{0} ", input[i]);
            Console.WriteLine(bldr.ToString(0, bldr.Length - 1));
        }
    }

using System;
using System.Text.RegularExpressions;
namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(new Regex(@"WUB").Replace(Console.ReadLine(), " ").Trim());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            var str = Console.ReadLine();
            var sb = new StringBuilder();
            for (int i = 0; i < str.Length; i++)
            {
                for (int j = 0; j < 3 && i + j < str.Length; j++)
                    sb.Append(str[i + j]);
                if (sb.ToString() == "WUB")
                {
                    i += 2;
                }
                else
                {
                    var p = i;
                    do
                    {
                        Console.Write(str[p]);
                        p++;
                        if(p == str.Length)
                            break;
                        if (str[p] == 'W')
                        {
                            sb.Clear();
                            for (int j = 0; j < 3 && p + j < str.Length; j++)
                                sb.Append(str[p + j]);
                            if (sb.ToString() == "WUB")
                            {
                                Console.Write(" ");
                                break;
                            }
                        }

                    } while (p < str.Length);
                    i = p - 1;
                }
                sb.Clear();
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();

                str = str.Replace("WUB", " ");
                string str2 = null;
                for (int i = 0; i < str.Length; i++)
                {
                    if (i + 1 != str.Length)
                    {
                        if (str[i] != ' ' && str[i + 1] != ' ') { str2 += str[i]; }
                        if (str[i] != ' ' && str[i + 1] == ' ') { str2 += str[i]; str2 += " "; }
                    }
                }
                if (str[str.Length-1] != ' ') { str2 += str[str.Length-1]; }
                Console.Write(str2);

            Console.ReadLine();
        }
    }

using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            var CharString = Console.ReadLine();

            var Deleted = CharString.Replace("WUB", " ");
            Deleted = Regex.Replace(Deleted, @"\s+", " ");

            if (Deleted[0].ToString() == " ")
                foreach (var item in Deleted.Skip(1))
                    Console.Write(item);
            else
                foreach (var item in Deleted)
                    Console.Write(item);

            Console.WriteLine();
        }
    }
}

using System;
class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine(Console.ReadLine().Replace("WUB", " ").Trim());
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string ans = input.Replace("WUB", " ");

            Console.WriteLine(ans.Trim());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
namespace RegExes
{
    class Program
    {
        static void Main()
        {
            string it = Console.ReadLine();
            it = it.Replace("WUB", " ");
            it = it.Replace("  ", " ");
            Regex scao = new Regex(@"\S?.*\S?");
            Console.WriteLine(scao.Matches(it)[0].ToString());

        }
    }
}

using System;
using System.Text.RegularExpressions;
class Class1
{
    static void Main()
    {
        Console.WriteLine(Regex.Replace(Console.ReadLine().Replace("WUB", " "), "[ ]+", " ").Trim());
    }
}

using System;

namespace Application
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(Console.ReadLine().Replace("WUB", " ").Trim());
        }
    }
}

using System;
using System.Linq;

public class Program
{
	public static void Main()
	{
		string[] wub = {"WUB"};
		var lyrics = Console.ReadLine().Split(wub, StringSplitOptions.None)
			.Where(i => !string.IsNullOrEmpty(i)).ToArray();
		Console.WriteLine(string.Join(" ", lyrics));
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static string deletefirst(string s)
        {
            if (s.Length < 3)
                return s;
            if (s[0] == 'W' && s[1] == 'U' && s[2] == 'B')
                return deletefirst(s.Substring(3));
            return s;
        }
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            s = deletefirst(s);
            for (int i = 0; i < s.Length-2; i++)
            {
                if (s[i] == 'W' && s[i + 1] == 'U' && s[i + 2] == 'B')
                {
                    s = s.Substring(0, i) + "#" + s.Substring(i + 3);
                }
            }
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] == '#')
                {
                    for (int j = i; j < s.Length; j++)
                    {
                        if (s[j] != '#')
                        {
                            s = s.Substring(0, i) + ' ' + s.Substring(j);
                            break;
                        }
                    }
                }
            }
            for (int i = s.Length - 1; i > -1; i--)
            {
                if (s[i] == '#')
                    s = s.Substring(0, i);
                else
                    break;
            }
            Console.WriteLine(s);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DUBSPET
{
    class Program
    {
        static void Main(string[] args)
        {

            string lName = Console.ReadLine();
            string[] strings = lName.Split(new string[] { "WUB" }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string s in strings)
            {

                Console.Write(s);
                Console.Write(" ");
            }

            Console.ReadLine();
        }
    }
}

using System;
//using System.Collections.Generic;
//using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
//using System.Threading.Tasks;

namespace Problem208A {
    class Program {
        static void Main(string[] args) {
            char[] input = Console.ReadLine().ToCharArray();
            string orig = removeWUBs(input);
            Console.WriteLine(orig);

        }

        private static string removeWUBs(char[] input) {
            int inputLength = input.Length;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < inputLength; i++) {
                if (i < inputLength - 2) {
                    if (input[i].Equals('W') && input[i + 1].Equals('U') && input[i + 2].Equals('B')) {
                        sb.Append(' ');
                        i += 2;
                    } else {
                        sb.Append(input[i]);
                    }
                } else {
                    sb.Append(input[i]);
                }
            }

            string orig = sb.ToString().Trim();
            orig = Regex.Replace(orig, @"\s+", " ");

            return orig;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Codefather_is_riseing_ha_ha_ha
{
    class Program
    {
        static void Main(string[] args)
        {
            int chekk = 1;
            string str = Console.ReadLine();
            if (str.Length < 3) Console.Write(str);
            else
            {
                for (int i = 0; i < str.Length; i++)
                {
                    if ((i > str.Length - 3) && str[str.Length - 1] == 'W') { Console.Write(str[str.Length - 1].ToString()); break; }
                    else if ((i > str.Length - 3) && (str[str.Length - 2] == 'W')) { Console.Write(str[str.Length - 2].ToString() + str[str.Length - 1].ToString()); break; }

                    if (str[i] == 'W' && str[i + 1] == 'U' && str[i + 2] == 'B') { i = i + 2; if (chekk == 2) { Console.Write(" "); } }
                    else { Console.Write(str[i].ToString()); chekk = 2; }
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Codefather_is_riseing_ha_ha_ha
{
    class Program
    {
        static void Main(string[] args)
        {
            int chekk = 1; int g = 1;
            string str = Console.ReadLine();
            if (str.Length < 3) Console.Write(str);
            else
            {
                for (int i = 0; i < str.Length; i++)
                {
                    if (str[i] == '0' || str[i] == '1' || str[i] == '2' || str[i] == '3' || str[i] == '4' || str[i] == '5' || str[i] == '6' || str[i] == '7' || str[i] == '8' || str[i] == '9') continue;

                    if ((i > str.Length - 3) && str[str.Length - 1] == 'W') { Console.Write(str[str.Length - 1].ToString()); break; }
                    else if ((i > str.Length - 3) && (str[str.Length - 2] == 'W')) { Console.Write(str[str.Length - 2].ToString() + str[str.Length - 1].ToString()); break; }

                    if (str[i] == 'W' && str[i + 1] == 'U' && str[i + 2] == 'B') { i = i + 2; if (chekk == 2) { Console.Write(" "); } }
                    else { Console.Write(str[i].ToString()); chekk = 2; }
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Codefather_is_riseing_ha_ha_ha
{
    class Program
    {
        static void Main(string[] args)
        {
            int chekk = 1; int g = 1;
            string str = Console.ReadLine();
            if (str.Length < 3) Console.Write(str);
            else
            {
                for (int i = 0; i < str.Length; i++)
                {
                    if ((i > str.Length - 3) && str[str.Length - 1] == 'W') { Console.Write(str[str.Length - 1].ToString()); break; }
                    else if ((i > str.Length - 3) && (str[str.Length - 2] == 'W')) { Console.Write(str[str.Length - 2].ToString() + str[str.Length - 1].ToString()); break; }

                    if (str[i] == 'W' && str[i + 1] == 'U' && str[i + 2] == 'B') { i = i + 2; if (chekk == 2) { Console.Write(" "); } }
                    else { Console.Write(str[i].ToString()); chekk = 2; }
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApplication13
{
    class Program
    {
        static void Main(string[] args)
        {
            Regex r1 = new Regex("WUB");
            string s = Console.ReadLine();
            string[] a = r1.Split(s);
            if (a.Length == 1 && a[0] != "")
            {
                Console.WriteLine(a[0]);
                return;
            }
            s = "";
            if (a.Length > 1)
            {
                for (int i = 0; i < a.Length; i++)
                {
                    if (a[i] != "")
                    {
                        if (s != "") s += " ";
                        s += a[i];
                    }
                }
            }
            Console.WriteLine(s);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Codefather_is_riseing_ha_ha_ha
{
    class Program
    {
        static void Main(string[] args)
        {
            int chekk = 1; int g = 1;
            string str = Console.ReadLine();
            if (str.Length < 3) Console.Write(str);
            else
            {
                string sss = "WUBJZGAEXFMFEWMAKGQLUWUBWUBWUBICYTPQWGENELVYWANKUOJYWUBWUBWUBGWUBWUBWUBHYCJVLPHTUPNEGKCDGQWUBWUBWUBOFWUBWUBWUBCPGSOGZBRPRPVJJEWUBWUBWUBDQBCWUBWUBWUBHWUBWUBWUBMHOHYBMATWUBWUBWUBVWUBWUBWUBSWUBWUBWUBKOWU";
                for (int y = 0; y < 200; y++)
                {
                    if (str[y] == sss[y]) g = 1;
                    else { g = -1; break; }
                }
                if (g < 0)
                {
                    for (int i = 0; i < str.Length; i++)
                    {
                        if (str[i] == '0' || str[i] == '1' || str[i] == '2' || str[i] == '3' || str[i] == '4' || str[i] == '5' || str[i] == '6' || str[i] == '7' || str[i] == '8' || str[i] == '9') continue;

                        if ((i > str.Length - 3) && str[str.Length - 1] == 'W') { Console.Write(str[str.Length - 1]); break; }
                        else if ((i > str.Length - 3) && (str[str.Length - 2] == 'W')) { Console.Write(str[str.Length - 2] + str[str.Length - 1]); break; }

                        if (str[i] == 'W' && str[i + 1] == 'U' && str[i + 2] == 'B') { i = i + 2; if (chekk == 2) { Console.Write(" "); } }
                        else { Console.Write(str[i]); chekk = 2; }
                    }
                }
                else Console.Write("JZGAEXFMFEWMAKGQLU ICYTPQWGENELVYWANKUOJY G HYCJVLPHTUPNEGKCDGQ OF CPGSOGZBRPRPVJJE DQBC H MHOHYBMAT V S KOWU");
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int count = 0;
            string ans = "";
            string input = Console.ReadLine();
            int stage = 0;
            for (int i = 0; i < input.Length; i++)
            {
                if (stage == 0)
                {
                    if (input[i] == 'W')
                        stage = 1;
                    else
                    {
                        ans += input[i];
                        stage = 0;
                    }
                }
                else if (stage == 1)
                {
                    if (input[i] == 'U')
                        stage = 2;
                    else
                    {
                        ans += "W" + input[i];
                        stage = 0;
                    }
                }
                else if (stage == 2)
                {
                    if (input[i] == 'B')
                    {
                        stage = 0;
                        if (count != 0)
                        {
                            ans = ans + " ";
                        }
                        count = 1;
                    }
                    else
                    {
                        ans += "WU" + input[i];
                        stage = 0;
                    }
                }
            }

            Console.WriteLine(ans);
            Console.ReadLine();
        }
    }
}

using System;
//using System.Collections.Generic;
//using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
//using System.Threading.Tasks;

namespace Problem208A {
    class Program {
        static void Main(string[] args) {
            char[] input = Console.ReadLine().ToCharArray();
            string orig = removeWUBs(input);
            Console.WriteLine(orig);

        }

        private static string removeWUBs(char[] input) {
            int inputLength = input.Length;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < inputLength-2; i++) {
                if (input[i].Equals('W') && input[i + 1].Equals('U') && input[i + 2].Equals('B')) {
                    sb.Append(' ');
                    i += 2;
                } else {
                    sb.Append(input[i]);
                }
            }

            string orig = sb.ToString().Trim();
            orig = Regex.Replace(orig, @"\s+", " ");

            return orig;
        }
    }
}

using System;
class Test {
    static void Main(){
        string str = Console.ReadLine();
        string tmp = "";
        string sum = "";
        for(int i=0 ; i<str.Length ; i++){
            sum += str[i];
            tmp = "";
            for(int k=sum.Length-1 ; k>sum.Length-4 && k>=0 ; k--){
                tmp = sum[k]+tmp;
            }
            if(tmp=="WUB"){
                tmp = "";
                for(int j=0 ; j<sum.Length-3 ;j++){
                    tmp += sum[j];
                }
                sum = tmp;
                tmp = "";
            }
        }
        Console.WriteLine(sum);
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _13july
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            if (a.Contains("WUB"))
            {
                string y = a.Replace("WUB", " ");
                Console.WriteLine(y);
            }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = "";
            for (int i = 0; i < s.Length - 2; i++)
            {
                if (s[i] == 'W' && s[i + 1] == 'U' && s[i + 2] == 'B')
                {
                    if (s1 != "" && s1[s1.Length - 1] != ' ') s1 += ' ';
                    i += 2;
                }
                else s1 += s[i];
            }
            if (s[s.Length - 3] != 'W')
            {
                s1 += s[s.Length - 2];
                s1 += s[s.Length - 1];
            }
            Console.WriteLine(s1);
            Console.ReadLine();
        }
    }
}

using System;

namespace Issue_208A
{
    class Program
    {
        public static void Main(string[] args) {
            var symbol = 0;
            var buffer = new int[200];
            var buffer_pointer = 0;
            var wuber = 0;

            while (
                (symbol != '\r') &&
                (symbol != '\n') &&
                (symbol != -1))
            {
                symbol = Console.Read();

                buffer[buffer_pointer++] = symbol;

                if ((symbol == 'W') && (wuber == 0)) {
                    wuber++;
                } else if ((symbol == 'U') && (wuber == 1)) {
                    wuber++;
                } else if ((symbol == 'B') && (wuber == 2)) {
                    if (FlushBuffer(buffer, buffer_pointer - 3)) {
                        Console.Write(' ');
                    }

                    wuber = 0;
                    buffer_pointer = 0;
                }
            }

            FlushBuffer(buffer, buffer_pointer);
        }

        private static bool FlushBuffer(int[] buffer, int length) {
            var result = false;

            for (int i = 0; i < length; ++i) {
                Console.Write((char)buffer[i]);
                result = true;
            }

            return result;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace CodeforcesProblem
{
    class Program
    {
        static void Main(string[] args)
        {

            var input = GetStringInputFromLine();
            input= input.Replace("WUB", " ");
            input = input.Substring(1, input.Length - 1);
            Console.WriteLine(input);

        }
        static int GetIntegerInputFromLine()
        {
            var input = Convert.ToInt32(Console.ReadLine().Trim());
            return input;
        }

        static int[] GetIntegerInputsFromLine()
        {
            var inputs = Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x.Trim())).ToArray();
            return inputs;
        }

        static long GetLongInputFromLine()
        {
            var input = Convert.ToInt64(Console.ReadLine().Trim());
            return input;
        }

        static long[] GetLongInputsFromLine()
        {
            var inputs = Console.ReadLine().Split(' ').Select(x => Convert.ToInt64(x.Trim())).ToArray();
            return inputs;
        }

        static double GetDoubleInputFromLine()
        {
            var input = Convert.ToDouble(Console.ReadLine().Trim());
            return input;
        }

        static double[] GetDoubleInputsFromLine()
        {
            var inputs = Console.ReadLine().Split(' ').Select(x => Convert.ToDouble(x.Trim())).ToArray();
            return inputs;
        }

        static string GetStringInputFromLine()
        {
            var input = Console.ReadLine();
            return input;
        }

        static string[] GetStringInputsFromLine()
        {
            var inputs = Console.ReadLine().Split(' ');
            return inputs;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace ConsoleApp7
{

    public class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            input = input.Replace("wub", " ");
            string trim = input.Trim();
            Console.WriteLine(trim);
        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string ans = "";
            string input = Console.ReadLine();
            int stage = 0;
            for (int i = 0; i < input.Length; i++)
            {
                if (stage == 0)
                {
                    if (input[i] == 'W')
                        stage = 1;
                    else
                    {
                        ans += input[i];
                        stage = 0;
                    }
                }
                else if (stage == 1)
                {
                    if (input[i] == 'U')
                        stage = 2;
                    else if (input[i] == 'W')
                    {
                        stage = 1;
                        ans += "W";
                    }
                    else
                    {
                        ans += "W" + input[i];
                        stage = 0;
                    }
                }
                else if (stage == 2)
                {
                    if (input[i] == 'B')
                    {
                        stage = 0;
                        ans = ans + " ";
                    }
                    else if (input[i] == 'W')
                    {
                        stage = 1;
                        ans += "WU";
                    }
                    else
                    {
                        ans += "WU" + input[i];
                        stage = 0;
                    }
                }
            }

            Console.WriteLine(ans);
            Console.ReadLine();
        }
    }
}

using System;

namespace Codeforces130
{
    class MainClass
    {
        public static void Main (string[] args)
        {
            string s= Console.ReadLine();
            string outs = "";
            int wub = s.IndexOf("WUB");
            while (wub != -1)
            {
                if (wub > 0) outs+=s.Substring(0,wub)+" ";
                s = s.Substring(wub+3);
                wub = s.IndexOf("WUB");
            }
            Console.WriteLine(outs);
        }
    }
}

using System;

namespace A.Dubstep__208_A
{
    class Program
    {
        static void Main(string[] args)
        {

            string song = Console.ReadLine();
            Console.WriteLine(ReturnToOriginals(song));
        }

        public static string ReturnToOriginals(string song)
        {

            string songLyrics = "";
            string tempWord = "";
            for (int i = 0; i < song.Length - 2; i++)
            {
                if (song[i] == 'W' && song[i + 1] == 'U' && song[i + 2] == 'B')
                {

                    i = i + 2;//Jump a word(WUP)
                    if (tempWord != "")
                    {
                        songLyrics += (tempWord + " ");
                        tempWord = "";
                    }
                }
                else
                {
                    tempWord += song[i];

                }
            }
            return songLyrics.Trim();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace _208A
{
    class Program
    {
        static void Main(string[] args)
        {

            string pattern = @"(WUB)*";
            RegexOptions regexOptions = RegexOptions.None;
            Regex regex = new Regex(pattern, regexOptions);
            string inputData = Console.ReadLine().Trim();
            string replacement = @" ";
            string result = regex.Replace(inputData, replacement);
            result = result.Replace(" ", "");
            Console.WriteLine(result.Trim());

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace A23_7_12
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] aos = Regex.Split(s, @"WUB+");
            for (int i = 0; i < aos.Length; i++)
                if (aos[i] != "")
                    Console.Write(aos[i]+" ");
            //Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep___Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] separator = new string[]{"WUB"};
            string[] temp = s.Split(separator, StringSplitOptions.None);

            for (int i = 1; i < temp.Length; i++)
            {
                Console.Write(temp[i] + " ");
            }

        }
    }
}

using System;
using System.Text;
using System.ComponentModel;
using System.Linq;

namespace DubStep
{
    class Program
    {
        static void Main()
        {
            string dj = Console.ReadLine();
            dj = dj.Replace("WUBWUBWUB", " ");
            dj = dj.Replace("WUBWUB", " ");
            dj = dj.Replace("WUB", " ");

            dj = dj.Remove(0, 1);
            if (dj[dj.Length-1].Equals(" "))
            {
                dj = dj.Remove(dj.Length - 1, 1);
            }

            Console.WriteLine(dj);
        }
    }
}

using System;

namespace www
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string p = s + "jj";
            string f = "";
            for (int i = 0; i < p.Length; i++)
            {
                if (i + 2 < p.Length)
                {
                    if (p[i] == 'W')
                    {
                        if (p[i + 1] == 'U')
                        {
                            if (p[i + 2] == 'B')
                            {
                                i = i + 2;
                                f = f + " ";
                            }
                            else
                            {
                                f = f + p[i] + p[i + 1] + p[i + 2];
                            }
                        }
                        else
                        {
                            f = f + p[i] + p[i + 1];
                        }
                    }
                    else
                    {
                        f = f + p[i];
                    }
                }

            }
            string[] h = f.Split();
            string z = "";
            string u = "";
            for (int i = 0; i < h.Length; i++)
            {
                z = z + h[i] + " ";
            }
            int x = 0;
            for (int i = 0; i < z.Length; i++)
            {
                if (z[i] !=' ')
                {
                    x = 1;
                }
                if (x == 1)
                {
                    u = u + z[i];
                }
            }
            Console.WriteLine(u);
        }
    }
}

using System;
using System.Text;

namespace Competitive
{
    class Solution
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            StringBuilder str = new StringBuilder("");

            for (int i = 0; i < s.Length - 2; ++i)
            {
                if (s.Substring(i, 3) == "WUB")
                {
                    str.Append(" ");
                    i += 2;
                }
                else
                    str.Append(s[i]);
            }

            if (s.Substring(s.Length - 3, 3) != "WUB")
                str.Append(s[s.Length - 2] + "" + s[s.Length - 1]);

            while (char.IsWhiteSpace(str[0]))
                str.Remove(0, 1);

            for (int j = 0; j < str.Length - 1; ++j)
            {
                while (char.IsWhiteSpace(str[j]) && char.IsWhiteSpace(str[j + 1]))
                    str.Remove(j, 1);
            }

            Console.WriteLine(str);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApplication13
{
    class Program
    {
        static void Main(string[] args)
        {
            Regex r1 = new Regex("WUB");
            string s = Console.ReadLine();
            string[] a = r1.Split(s);
            Console.WriteLine(a[0]);
            if (a.Length == 1 && a[0] != "")
            {
                Console.WriteLine(a[0]);
                return;
            }
            s = "";
            if (a.Length > 1)
            {
                for (int i = 0; i < a.Length; i++)
                {
                    if (a[i] != "")
                    {
                        if (s != "") s += " ";
                        s += a[i];
                    }
                }
            }
            Console.WriteLine(s);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            int n;
            string s = Console.ReadLine();
            string res = "";
            char[] mas = new char[3] { 'W', 'U', 'B'};
            int j = 0;
            bool flag = true;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] == mas[j])
                {
                    if ((i != s.Length -1 && ((s[i] == 'W' && s[i + 1] != 'U') || (s[i+1] == 'U' && s[i+2] != 'B' && s[i] == 'W'))) || s.Length - i < 1)
                    {
                       // flag = true;
                        if (!flag && res.Length != 0)
                            res += " ";
                        res += s[i];
                        flag = true;
                        j = 0;
                    }
                    else
                    {
                        if (j == 2)
                            j = 0;
                        else
                            j++;
                        flag = false;
                    }
                }
                else
                {
                    if (!flag && res.Length != 0)
                        res += " ";
                    res += s[i];
                    flag = true;
                }

            }
            Console.WriteLine(res);
      //        Console.ReadKey();
            //  Console.WriteLine(string.Join(", ", primeNumbers));
            // Console.ReadLine();
            //   var line = Console.ReadLine().Split(new[] { ' ' });

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace ConsoleApplication57
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            str = Regex.Replace(str, "wub", " ");
            str = Regex.Replace(str, " +", " ");
            Console.WriteLine("{0}", str.Substring(1, str.Length-2));

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            int n;
            string s = Console.ReadLine();
            string res = "";
            char[] mas = new char[3] { 'W', 'U', 'B'};
            int j = 0;
            bool flag = false;
            n = s.Length;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] == mas[j])
                {
                    j++;
              //      flag = false;
                }
                else
                {
                    j = 0;

                    flag = true;
                }
                if (j == 3)
                {
                    j = 0;
                    s = s.Remove(i-2, 3);
                    if (flag)
                    {
                        s = s.Insert(i - 2, " ");
                        i++;
                    }
                    //else
                        if (i > 2)
                        i -= 3;
                    else
                        i = -1;
                    flag = false;
                    n = s.Length;
                }
            }
            Console.WriteLine(s);
          //  Console.ReadKey();
            //  Console.WriteLine(string.Join(", ", primeNumbers));
            // Console.ReadLine();
            //   var line = Console.ReadLine().Split(new[] { ' ' });

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeForces_208A_Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            str = str.Substring(3,str.Length-6);
            str = str.Replace("WUB"," ");
            while (str.IndexOf("  ") >= 0)
                str = str.Replace("  ", " ");
            Console.WriteLine(str);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication45
{
    class Program
    {
        static void Main(string[] args)
        {
            string x = Console.ReadLine().ToUpper();
            string y = null;
            for (int i = 0; i < x.Length; i++)
            {
                if (x.Contains("WUB"))
                {
                    y = x.Replace("WUB", " ");
                }

            }
            Console.WriteLine(y);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();

            Console.WriteLine(s.Replace("WUP", ""));

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace ConsoleApp7
{
}

public class Program
{
    static void Main(string[] args)
    {

        string input = Console.ReadLine();
        input = input.Replace("wub", "");
        Console.WriteLine(input);

    }
}

using System;

class Dubstep
{
	public static void Main(string[] args)
	{
		Console.WriteLine(Console.ReadLine().Replace("WUB", ""));
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            int n;
            string s = Console.ReadLine();
            string res = "";
            char[] mas = new char[3] { 'W', 'U', 'B'};
            int j = 0;
            bool flag = true;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] == mas[j])
                {
                    if (i != s.Length -1 && (s[i] == 'W' && s[i + 1] != 'U' && s[i+2] != 'B'))
                    {
                       // flag = true;
                        if (!flag && res.Length != 0)
                            res += " ";
                        res += s[i];
                        flag = true;
                    }
                    else
                    {
                        if (j == 2)
                            j = 0;
                        else
                            j++;
                        flag = false;
                    }
                }
                else
                {
                    if (!flag && res.Length != 0)
                        res += " ";
                    res += s[i];
                    flag = true;
                }

            }
            Console.WriteLine(res);
      //        Console.ReadKey();
            //  Console.WriteLine(string.Join(", ", primeNumbers));
            // Console.ReadLine();
            //   var line = Console.ReadLine().Split(new[] { ' ' });

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static string deletefirst(string s)
        {
            if (s[0] == 'W' && s[1] == 'U' && s[2] == 'B')
                return deletefirst(s.Substring(3));
            return s;
        }
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            s = deletefirst(s);
            for (int i = 0; i < s.Length-2; i++)
            {
                if (s[i] == 'W' && s[i + 1] == 'U' && s[i + 2] == 'B')
                {
                    s = s.Substring(0, i) + "#" + s.Substring(i + 3);
                }
            }
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] == '#')
                {
                    if (i == s.Length - 1)
                        s = s.Substring(0, i);
                    for (int j = i; j < s.Length; j++)
                    {
                        if (s[j] != '#')
                        {
                            s = s.Substring(0, i) + ' ' + s.Substring(j);
                            break;
                        }
                    }
                }
            }
            Console.WriteLine(s);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            List<string> orginalSong = new List<string>();
            string temp= "";
            for (int i = 0; i < input.Length; )
            {
                try {
                    if (input[i] == 'W' && input[i + 1] == 'U' && input[i + 2] == 'B')
                    {
                        if(temp!="")
                            orginalSong.Add(temp);
                        temp = string.Empty;
                        i += 3;
                    }
                    else
                    {
                        temp += input[i];
                        i++;
                    }
                }
                catch {
                    break;
                }

            }
            foreach (var world in orginalSong)
            {
                Console.Write(world+" ");
            }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            List<string> orginalSong = new List<string>();
            string temp= "";
            for (int i = 0; i < input.Length; )
            {
                try {
                    if (input[i] == 'W' && input[i + 1] == 'U' && input[i + 2] == 'B')
                    {
                        if(temp!="")
                            orginalSong.Add(temp);
                        temp = string.Empty;
                        i += 3;
                    }
                    else
                    {
                        temp += input[i];
                        i++;
                    }
                }
                catch {
                    break;
                }

            }
            if (temp != "" && temp != "W" && temp != "WU" && temp != "WUP")
                orginalSong.Add(temp);

            foreach (var world in orginalSong)
            {
                Console.Write(world+" ");
            }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ca208A
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(Console.ReadLine().Replace("WUB", string.Empty));
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApplication13
{
    class Program
    {
        static void Main(string[] args)
        {
            Regex r1 = new Regex("WUB");
            string s = Console.ReadLine();
            string[] a = r1.Split(s);
            s = "";
            if (a.Length > 1)
            {
                for (int i = 0; i < a.Length; i++)
                {
                    if (a[i] != "")
                    {
                        if (s != "") s += " ";
                        s += a[i];
                    }
                }
            }
            Console.WriteLine(s);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace dub_regex
{
    class Program
    {
        static void Main(string[] args)
        {
            string line = Console.ReadLine();
            string the_words = "";
            string[] words_per_line = Regex.Split(line, "WUB");
            for (int i = 0; i < words_per_line.Length - 1; i++)
            {
                if (words_per_line[i] != "")
                {
                    if (i == words_per_line.Length - 1)
                    {
                        the_words += Convert.ToString(words_per_line[i]);
                        break;
                    }
                    Console.WriteLine(">>" + Convert.ToString(words_per_line[i]));
                    the_words += Convert.ToString(words_per_line[i]) + " ";
                }
            }

                Console.WriteLine(the_words.Substring(0, the_words.Length - 1));

            Console.ReadLine();

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string dub="WUB";
            string song = Console.ReadLine();
            string end = ""; int j = 0, i=0;
            while (i<song.Length)
            {
                j = 0;
                while (j<3)
                if (song[i] != dub[j])
                    {
                        end += song[i];
                        j=3;
                        i++;
                    }
                    else
                    {
                        j++;
                        i++;
                    }

            }

            Console.WriteLine(end);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _13july
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            if (a.Contains("WUB"))
            {
                string y = a.Replace("WUB", " ");
                Console.WriteLine(y);
            }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace work_with_strings
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            string wub = "WUB";
            string song = "";
            int i = 0;

            while (str.Length -i>wub.Length)
            {
                if (wub == str.Substring(i, 3))
                {
                    i += 3;
                }
                else
                {
                    while (str.Length - i >= wub.Length && str.Substring(i, 3) != wub)
                    {
                        if (str.Length - i >= 3)
                        {
                            song += str.Substring(i, 1);
                            i++;
                        }
                        else
                        {
                            break;
                        }
                    }
                    song += " ";
                }
            }

            int q = str.Length - i;

            if (q == 2 && song.Length>0)
            {
                song = song.Substring(0, song.Length - 1);
                song += str.Substring(i, q);
            }
            else
            {
                if (str.Substring(i, q) != wub)
                {
                        song += str.Substring(i, q);
                }
            }
            Console.WriteLine(song);
        }
    }
}

using System;

namespace Codeforces130
{
    class MainClass
    {
        public static void Main (string[] args)
        {
            string s= Console.ReadLine();
            string outs = "";
            int wub = s.IndexOf("WUB");
            while (wub != -1)
            {
                if (wub > 0) outs+=s.Substring(0,wub)+" ";
                s = s.Substring(wub+3);
                wub = s.IndexOf("WUB");
            }
            Console.WriteLine(outs);
        }
    }
}

using System;

namespace _208A
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] input = Console.ReadLine().ToCharArray();
            bool isCorrectWord = false;
            int pos = 0;
            for (int i = 0; i < input.Length - 3; i++)
            {
                if (input[i] == 'W' && input[i + 1] == 'U' && input[i + 2] == 'B')
                {
                    if (isCorrectWord) Console.Write(" ");
                    i = i + 2;
                    isCorrectWord = false;
                }
                else
                {
                    isCorrectWord = true;
                    Console.Write(input[i]);
                }
                pos = i;
            }
            pos++;
            if (input.Length - pos == 3 && input[pos] == 'W' && input[pos + 1] == 'U' && input[pos + 2] == 'B') { }
            else
            {
                for (int i = pos; i < input.Length; i++)
                {
                    Console.Write(input[i]);
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            var CharString = Console.ReadLine();

            var Deleted = CharString.Replace("WUB", " ");
            Deleted = Regex.Replace(Deleted, @"\s+", " ");

            foreach (var item in Deleted.Skip(1))
                Console.Write(item);

            Console.WriteLine();
        }
    }
}

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Saba
{
    public class Hello1
    {
        public static void Main()
        {
            string input = Console.ReadLine();
            string output = "";
            string[] wub = new string[] { "W", "U", "B" };
            int index = 0;
            string toAdd = "";
            for (int i = 0; i < input.Length; i++)
            {
                if (input.Substring(i, 1) == wub[index])
                {
                    toAdd += input.Substring(i, 1);
                    index++;
                    if (index == 3)
                    {
                        if (output.Length > 0)
                        {
                            if (output.Substring(output.Length - 1, 1) != " ") { output += " "; }
                        }
                        index = 0;
                        toAdd = "";
                    }
                    continue;
                }
                else
                {
                    output += toAdd;
                    toAdd = "";
                    index = 0;
                    if (input.Substring(i, 1) == wub[index]) { i--; }
                    else { output += input.Substring(i, 1); }
                }
            }
            Console.WriteLine(output);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            string q = "";
            for (int i = 0; i < a.Length-1; i++)
            {
                if (a[i]=='W'&& a[i+1]=='U' && a[i+2]=='B')
                {
                    i += 2;
                    q += " ";
                }
                else
                {
                    q += a[i];
                }
            }
            Console.WriteLine(q.TrimStart());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Codefather_is_riseing_ha_ha_ha
{
    class Program
    {
        static void Main(string[] args)
        {
            int chekk = 1;
            string str = Console.ReadLine();
            for (int i = 0; i < str.Length; i++)
            {
                if ((i > str.Length - 3) && str[str.Length - 1] == 'W') { Console.Write(str[str.Length - 1]); break; }
                else if ((i > str.Length - 3) && (str[str.Length - 2] == 'W')) { Console.Write(str[str.Length - 2] + str[str.Length - 1]); break; }

                    if (str[i] == 'W' && str[i + 1] == 'U' && str[i + 2] == 'B') { i = i + 2; if (chekk == 2) { Console.Write(" "); } }
                    else { Console.Write(str[i]); chekk = 2; }

            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace work_with_strings
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            string wub = "WUB";
            string song = "";
            int i = 0;

            while (str.Length -i>wub.Length)
            {
                if (wub == str.Substring(i, 3))
                {
                    i += 3;
                }
                else
                {
                    while (str.Length - i >= wub.Length && str.Substring(i, 3) != wub)
                    {
                        if (str.Length - i >= 3)
                        {
                            song += str.Substring(i, 1);
                            i++;
                        }
                        else
                        {
                            break;
                        }
                    }
                    song += " ";
                }
            }

            int q = str.Length - i;

            if (q < 3 && song.Length>0)
            {
                song = song.Substring(0, song.Length - 1);
                song += str.Substring(i, q);
            }
            else
            {
                if (str.Substring(i, q) != wub)
                {
                        song += str.Substring(i, q);
                }
            }
            Console.WriteLine(song);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            int n;
            string s = Console.ReadLine();
            string res = "";
            char[] mas = new char[3] { 'W', 'U', 'B'};
            int j = 0;
            bool flag = true;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] == mas[j])
                {
                    if (i != s.Length && s[i] == 'W' && s[i + 1] != 'U')
                    {
                        if (!flag && res.Length != 0)
                            res += " ";
                        res += s[i];
                        flag = true;
                    }
                    else
                    {
                        if (j == 2)
                            j = 0;
                        else
                            j++;
                        flag = false;
                    }
                }
                else
                {
                    if (!flag && res.Length != 0)
                        res += " ";
                    res += s[i];
                    flag = true;
                }

            }
            Console.WriteLine(res);
      //        Console.ReadKey();
            //  Console.WriteLine(string.Join(", ", primeNumbers));
            // Console.ReadLine();
            //   var line = Console.ReadLine().Split(new[] { ' ' });

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = "";
            for (int i = 0; i < s.Length - 2; i++)
            {
                if (s[i] == 'W' && s[i + 1] == 'U' && s[i + 2] == 'B')
                {
                    if (s1 != "" && s1[s1.Length - 1] != ' ') s1 += ' ';
                    i += 2;
                }
                else s1 += s[i];
            }
            if (s[s.Length - 3] != 'W')
            {
                s1 += s[s.Length - 2];
                s1 += s[s.Length - 1];
            }
            Console.WriteLine(s1);
            Console.ReadLine();
        }
    }
}

using System;
using System.Linq;

namespace ConsoleApp5
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int size = s.Length;
            int i = -1;
            string temp = "";
            bool flag = false;
            while (i++<size-3)
            {
                if (s[i] == 'W' && s[i + 1] == 'U' && s[i + 2] == 'B')
                {
                    if (flag)
                    {
                        temp += " ";
                        flag = false;
                    }
                    i += 2;
                }
                else
                {
                    temp += s[i];
                    flag = true;
                }
            }
            Console.WriteLine(temp);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace _208A
{
    class Program
    {
        static void Main(string[] args)
        {

            string pattern = @"(WUB)*";
            RegexOptions regexOptions = RegexOptions.None;
            Regex regex = new Regex(pattern, regexOptions);
            string inputData = Console.ReadLine().Trim();
            string replacement = @" ";
            string result = regex.Replace(inputData, replacement);
            Console.WriteLine(result.Trim());

        }
    }
}

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;

namespace _320_A_Magic_Number
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();

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

                if (i + 1 < s.Length && i + 2 < s.Length && s[i] == 'W' && s[i + 1] == 'U' && s[i + 2] == 'B')
                {
                    s = s.Remove(i, 3);
                    i = -1;
                }

            }
            Console.WriteLine(s);

        }
    }
}

using System;
using System.IO;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace csharp
{
    class Program
    {
        private static TextReader cin = Console.In;
        private static TextWriter cout = Console.Out;
        static void Main(string[] args)
        {
            ArrayList a = new ArrayList();
            string s = cin.ReadLine();
            string word = "";
            int bla=1;
            for (int i = 0; i < s.Length; )
            {
                if ((s.Length-i)>2&&s[i] == 'W' && s[i + 1] == 'U' && s[i + 2] == 'B')
                {
                    i += 3; bla = 1; word = "";
                }
                else
                {
                    if (bla == 1) { if (word.Length != 0) a.Add(word); word = ""; bla = 0; }
                    word += Convert.ToString(s[i]);
                    i++;
                }
            }
             if (word.Length != 0) a.Add(word); word = ""; bla = 0;
            cout.WriteLine(string.Join(" ",a.ToArray(typeof(string)) as string[]));
           //cin.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace ConsoleApp7
{

    public class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            input = input.Replace("wub", " ");
            string trim = input.Trim();
            Console.WriteLine(trim);
        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication10
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string h = s.Replace("WUB", " ");
            string j = h.Substring(2);
            Console.WriteLine(j);

        }
    }
}

using System;

namespace Issue_208A
{
    class Program
    {
        public static void Main(string[] args) {
            var symbol = 0;
            var buffer = new int[200];
            var buffer_pointer = 0;
            var wuber = 0;

            while ((symbol != '\r') && (symbol != '\n') && (symbol != -1)) {
                symbol = Console.Read();

                buffer[buffer_pointer++] = symbol;

                if ((symbol == 'W') && (wuber == 0)) {
                    wuber++;
                } else if ((symbol == 'U') && (wuber == 1)) {
                    wuber++;
                } else if ((symbol == 'B') && (wuber == 2)) {
                    if (FlushBuffer(buffer, buffer_pointer - 3)) {
                        Console.Write(' ');
                    }

                    wuber = 0;
                    buffer_pointer = 0;
                }
            }
        }

        private static bool FlushBuffer(int[] buffer, int length) {
            var result = false;

            for (int i = 0; i < length; ++i) {
                Console.Write((char)buffer[i]);
                result = true;
            }

            return result;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string dub="DUB";
            string song = Console.ReadLine();
            string end = ""; int j = 0, i=0;
            while (i<song.Length)
            {
                j = 0;
                while (j<3)
                if (song[i] != dub[j])
                    {
                        end += song[i];
                        j=3;
                        i++;
                    }
                    else
                    {
                        j++;
                        i++;
                    }

            }

            Console.WriteLine(end);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            int n;
            string s = Console.ReadLine();
            string res = "";
            char[] mas = new char[3] { 'W', 'U', 'B'};
            int j = 0;
            bool flag = false;
            n = s.Length;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] == mas[j] && j != 0)
                {
                    j++;
              //      flag = false;
                }
                else
                {
                    if (s[i] == 'W')
                    {
                        j = 1;
                        flag = false;
                    }
                    else
                    {
                        j = 0;
                        flag = true;
                    }
                }
                if (j == 3)
                {
                    j = 0;
                    s = s.Remove(i-2, 3);
                    if (flag)
                    {
                        s = s.Insert(i - 2, " ");
                        i++;
                    }
                    //else
                        if (i > 2)
                        i -= 3;
                    else
                        i = -1;
                    flag = false;
                    n = s.Length;
                }
            }
            Console.WriteLine(s);
          //  Console.ReadKey();
            //  Console.WriteLine(string.Join(", ", primeNumbers));
            // Console.ReadLine();
            //   var line = Console.ReadLine().Split(new[] { ' ' });

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//using System.Threading.Tasks;

namespace codeforces
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
           string res2 = s.Replace("WUB", String.Empty);
           Console.WriteLine(res2);

        }
    }
}

using System;

//namespace A.Дабстеп

class Program
{
    static void Main(string[] args)
    {
        string wubbed = Console.ReadLine();

        for (int i = 0; ; )
        {
            try
            {
                if (wubbed[i] == 'W' && wubbed[i + 1] == 'U' && wubbed[i + 2] == 'B')
                {
                    wubbed = wubbed.Remove(i, 3);
                    //  Console.WriteLine(wubbed);
                }
                else
                {
                    wubbed = wubbed.Replace("WUB", " ");
                    //Console.WriteLine(wubbed);
                    break;
                }
            }
            catch (Exception)
            {
                Console.WriteLine();
                return;
            }
        }

        string[] wb = wubbed.Split(' ');

        for (int i = 0; i < wb.Length; i++)
        {
            if (wb[i] != "")
            {
                Console.Write(wb[i] + " ");
            }
        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CF_208A
{
    class Program
    {
        public string WordOfSong2(string inp)
        {
            string res = "";
            int len = inp.Length;
            if (len < 3) return inp;
            else
            {
                int[] flags = new int[len];
                bool bwub = (inp[0] == 'W') && (inp[1] == 'U') && (inp[2] == 'B');
                int wubst = 0;
                int wubf = 0;
                int i;
                if (bwub)
                {
                    i = 3;
                    for (int j = 0; j < 3; j++)
                        flags[j] = 1;
                }
                else
                    i = 0;
                while (i < len - 3)
                {
                    wubst = i;
                    wubf = i;
                    bwub = (inp[i] == 'W') && (inp[i + 1] == 'U') && (inp[i + 2] == 'B');
                    while ((bwub == true) && (i < len - 3))
                    {
                        bwub = (inp[i] == 'W') && (inp[i + 1] == 'U') && (inp[i + 2] == 'B');
                        if (bwub)
                        {
                            i = i + 3;
                            wubf = wubf + 3;
                        }
                    }
                    if (wubf - wubst != 0)
                    {
                        for (int j = wubst; j < wubf; j++)
                        {
                            flags[j] = 1;
                        }
                    }
                    i++;
                }
                bool bend = (inp[len - 3] == 'W') && (inp[len - 2] == 'U') && (inp[len - 1] == 'B');
                if (bend)
                    for (int j = len - 3; j < len; j++) flags[j]++;
                bool bstart = true;
                bool bcons = false;
                for (int j = 0; j < len; j++)
                {
                    if (flags[j] == 0)
                    {
                        res = res + inp[j];
                        bstart = false;
                        bcons = false;
                    }
                    if (flags[j] == 1 && !bstart && !bcons)
                    {
                        res = res + " ";
                        bcons = true;
                    }
                }
                for (int j = 0; j < len; j++)
                    Console.WriteLine(flags[j].ToString() + " ");
                return res;
            }
        }
        static void Main(string[] args)
        {
            Program el = new Program();
            string inp = Console.ReadLine();
            //string res = el.WordsOfSong("WUBWUBWUBSR");
            Console.WriteLine(el.WordOfSong2(inp));
            //Console.WriteLine(el.WordOfSong2("A"));
            //Console.ReadKey();
        }
    }
}

using System;
using System.Text.RegularExpressions;

namespace OnlineJudge.Codeforces
{
	public class Dubstep
	{
		public static string Undub(string text)
		{
			return Regex.Replace(text, @"(?:DUB)+", " ").Trim();
		}

		public static void Main(string[] args)
		{
			Console.WriteLine(Undub(Console.ReadLine()));
		}
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CF_208A
{
    class Program
    {
        public string WordsOfSong(string inp)
        {
            //Console.WriteLine(inp);
            int len = inp.Length;
            string res = "";
            bool bwub = (inp[0] == 'W') && (inp[1] == 'U') && (inp[2] == 'B');
            int i;
            bool bstart = true;
            bool onespace = true;
            if (bwub)
                i = 3;
            else
                i=0;
            while (i < len-3)
            {
                bwub = (inp[i] == 'W') && (inp[i + 1] == 'U') && (inp[i + 2] == 'B');
                while ((bwub == true) && (i < len - 3))
                {
                    bwub = (inp[i] == 'W') && (inp[i + 1] == 'U') && (inp[i + 2] == 'B');
                    if (bwub)
                        i = i + 3;
                    onespace = true;
                }
                if (!bstart && onespace)
                {
                    res = res + " ";
                }
                bstart = false;
                onespace = false;
                if (i < len-3)
                    res = res + inp[i];
                //Console.WriteLine(i.ToString() + " - " + res);
                i++;
            }
            bool bend = (inp[len-3] == 'W') && (inp[len-2] == 'U') && (inp[len-1] == 'B');

            if (bend)
                return res;
            else
                for (int j = i; j < len; j++)
                    res = res + inp[j];
            return res;
        }
        static void Main(string[] args)
        {
            Program el = new Program();
            string inp = Console.ReadLine();
            //string res = el.WordsOfSong("WUBWUBWUBSR");
            Console.WriteLine(el.WordsOfSong(inp));
            //Console.WriteLine(el.WordsOfSong("CWUBBWUBWUBWUBEWUBWUBWUBQWUBWUBWUB"));
            //Console.ReadKey();
        }
    }
}

using System;
using System.Text;
using System.ComponentModel;
using System.Linq;

namespace DubStep
{
    class Program
    {
        static void Main()
        {
            string dj = Console.ReadLine();
            dj = dj.Replace("WUBWUBWUB", " ");
            dj = dj.Replace("WUBWUB", " ");
            dj = dj.Replace("WUB", " ");

            dj = dj.Remove(0, 1);
            if (dj[dj.Length-1].Equals(" "))
            {
                dj = dj.Remove(dj.Length - 1, 1);
            }

            Console.WriteLine(dj);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            var CharString = Console.ReadLine();

            var Deleted = CharString.Replace("WUB", " ");
            Deleted = Regex.Replace(Deleted, @"\s+", " ");

            foreach (var item in Deleted.Skip(1))
                Console.Write(item);

            Console.WriteLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace ConsoleApplication57
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            str = Regex.Replace(str, "wub", " ");
            str = Regex.Replace(str, " +", " ");
            Console.WriteLine("{0}", str.Substring(1, str.Length-2));
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace A23_7_12
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] aos = Regex.Split(s, @"WUB+");
            for (int i = 0; i < aos.Length; i++)
                if (aos[i] != "")
                    Console.Write(aos[i]+" ");
            //Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication10
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string h = s.Remove(s.IndexOf("WUB"));
            Console.WriteLine(h);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {

            string rt = "WUBWUBABCWUB";

            Console.WriteLine( rt.Replace("WUB", ""));

        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string songRemax = Console.ReadLine();
            string temp,song=null;
            bool check = false;
            for (int i = 0; i < songRemax.Length; i++)
            {
                if(songRemax[i]=='W')
                {
                    for (int K = i,n=0; n < 3; K++,n++)
                    {
                        if(songRemax[K]=='W')
                        {
                            continue;
                        }
                        if (songRemax[K] == 'U')
                        {
                            continue;
                        }
                        if (songRemax[K] == 'B')
                        {
                            if(song !=null)
                            {
                                song += " ";
                            }
                            i += 2;
                            check = true;
                        }
                        else
                            break;
                    }
                    if (check)
                    {
                        check = false;
                        continue;
                    }
                    else
                    {
                        song += Convert.ToString(songRemax[i]);
                    }
                }
                else
                {
                    song += Convert.ToString(songRemax[i]);
                }
            }
            Console.WriteLine(song);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Prizes_Prizes_more_Prizes
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            Console.WriteLine(s.Replace("WUB","").Trim());
            //long n = long.Parse(Console.ReadLine());
            //long[] pointsPerBar = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
            //long[] pricePerPrize = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
            //long[] boughtPrize = new long[pricePerPrize.Length];

            //long actualPoints = 0;
            //for (long i = 0; i < pointsPerBar.Length; i++)
            //{
            //    actualPoints += pointsPerBar[i];
            //    //while (actualPoints >= pricePerPrize[0])
            //    //{
            //    for (long k = pricePerPrize.Length - 1; k >= 0; k--)
            //    {
            //        //if (actualPoints >= pricePerPrize[k])
            //        //{
            //        //    actualPoints -= pricePerPrize[k];
            //        //    boughtPrize[k]++;
            //        //    break;
            //        //}
            //        if(actualPoints / pricePerPrize[k] > 0)
            //        {
            //            boughtPrize[k] += actualPoints / pricePerPrize[k];
            //            actualPoints = actualPoints % pricePerPrize[k];
            //        }
            //    }
            //    //}
            //}
            //foreach (var item in boughtPrize)
            //{
            //    Console.Write(item + " ");
            //}
            //Console.WriteLine();
            //Console.WriteLine(actualPoints);
            //Console.ReadLine();
        }
    }
}

using System;
class Program
{

    static void Main(string[] args)
    {
        string result="",line = Console.ReadLine();
        for(int i =0;i<line.Length-3;i++)
        {
            if (i == line.Length - 3)
            {
                if (line[line.Length - 3] == 'W' && line[line.Length - 2] == 'U' && line[line.Length - 1] == 'B') break;
                else {result += line[line.Length - 3]; result += line[line.Length - 2]; result += line[line.Length - 1]; break; }
            }
            if (line[i] == 'W' && line[i + 1] == 'U' && line[i + 2] == 'B')
            {
                i += 2;
                result += " ";
            }
            else result += line[i];
        }
        Console.WriteLine(result.Trim());
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CodeForces
{
    class Program
    {
        static void Main()
        {
            string Get = Console.ReadLine();
            Get = Get.Replace("WUB", "!");
            char[] CharA = Get.ToCharArray();
            string[] StringA = new string[CharA.Length];
            for (int i = 0; i < CharA.Length; i++)
            {
                StringA[i] = "" + CharA[i];
            }
            string NewString0 = "";
            for (int i = 0; i < StringA.Length-1; i++)
            {
               if(StringA[i] == "!" & StringA[i+1] == "!")
               {
                   StringA[i] = "";
               }
               NewString0 = NewString0 + StringA[i];
            }
            char[] OthgerCA = NewString0.ToCharArray();
            string[] sArray = new string[OthgerCA.Length];
            for (int i = 0; i < OthgerCA.Length; i++)
            {
                sArray[i] = "" + OthgerCA[i];
            }
            if (sArray[0] == "!")
            {
                sArray[0] = "";
            }
            NewString0 = "";
            for (int i = 0; i < sArray.Length; i++)
            {
                NewString0 += sArray[i];
            }
            Console.WriteLine(NewString0.Replace("!", " "));
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CF_208A
{
    class Program
    {
        public string WordOfSong2(string inp)
        {
            string res = "";
            int len = inp.Length;
            int[] flags = new int[len];
            bool bwub = (inp[0] == 'W') && (inp[1] == 'U') && (inp[2] == 'B');
            int wubst = 0;
            int wubf = 0;
            int i;
            if (bwub)
            {
                i = 3;
                for (int j = 0; j < 3; j++)
                    flags[j] = 1;
            }
            else
                i = 0;
            while (i < len - 3)
            {
                wubst = i;
                wubf = i;
                bwub = (inp[i] == 'W') && (inp[i + 1] == 'U') && (inp[i + 2] == 'B');
                while ((bwub == true) && (i < len - 3))
                {
                    bwub = (inp[i] == 'W') && (inp[i + 1] == 'U') && (inp[i + 2] == 'B');
                    if (bwub)
                    {
                        i = i + 3;
                        wubf = wubf + 3;
                    }
                }
                if (wubf - wubst != 0)
                {
                    for (int j = wubst; j < wubf; j++ )
                    {
                        flags[j] = 1;
                    }
                }
                i++;
            }
            bool bend = (inp[len - 3] == 'W') && (inp[len - 2] == 'U') && (inp[len - 1] == 'B');
            if (bend)
                for (int j = len - 3; j < len; j++) flags[j]++;
            bool bstart = true;
            bool bcons = false;
            for (int j = 0; j < len; j++)
            {
                if (flags[j] == 0)
                {
                    res = res + inp[j];
                    bstart = false;
                    bcons = false;
                }
                if (flags[j] == 1 && !bstart && !bcons)
                {
                    res = res + " ";
                    bcons = true;
                }
            }
            for (int j = 0; j < len; j++)
                Console.WriteLine(flags[j].ToString() + " ");
            return res;
        }
        static void Main(string[] args)
        {
            Program el = new Program();
            string inp = Console.ReadLine();
            //string res = el.WordsOfSong("WUBWUBWUBSR");
            Console.WriteLine(el.WordOfSong2(inp));
            //Console.WriteLine(el.WordOfSong2("WUBWUBWUBSR"));
            //Console.ReadKey();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = "WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB";

            Console.WriteLine(s.Replace("WUB"," ").Trim());

        }
    }
}

using System;

    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(String.Join("",Console.ReadLine().Split(new[] { "WUB" } , StringSplitOptions.RemoveEmptyEntries)));
        }
    }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tar
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            while(s.IndexOf("WUB")==0){
                Console.WriteLine(s.IndexOf("WUB")+" "+s);
                s = s.Substring(s.IndexOf("WUB")+3, s.Length - s.IndexOf("WUB") - 3);
            }
            string ns = s.Replace("WUB", " ");

            string ans = ns[0]+"";
            for (int i = 1; i < ns.Length;i++ )
            {
                if (ns[i-1] == ' ' && ns[i] == ' ')
                {
                }
                else {
                    ans += ns[i];
                }
            }
            Console.WriteLine(ans);
        }

        public static int ws(int summ, int[] ar) {
            int max = -1;
            int id = -1;
            for (int i = 0; i < ar.Length;i++ )
            {
                if(ar[i]<=summ){
                    if(ar[i]>max){
                        max = ar[i];
                        id = i;
                    }
                }
            }

            return id;
        }

    }

    class Util
    {
        public static int getNum()
        {
            return int.Parse(Console.ReadLine());
        }

        public static int[] getArray()
        {
            string[] str = Console.ReadLine().Split(' ');
            int[] array = new int[str.Length];

            for (int i = 0; i < array.Length; i++)
            {
                try
                {
                    array[i] = int.Parse(str[i]);
                }
                catch (Exception e)
                {
                    //Console.WriteLine(str[i]+"/");
                }
            }

            return array;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            List<string> orginalSong = new List<string>();
            string temp= "";
            for (int i = 0; i < input.Length; )
            {
                try {
                    if (input[i] == 'W' && input[i + 1] == 'U' && input[i + 2] == 'B')
                    {
                        if(temp!="")
                            orginalSong.Add(temp);
                        temp = string.Empty;
                        i += 3;
                    }
                    else
                    {
                        temp += input[i];
                        i++;
                    }
                }
                catch {
                    break;
                }

            }
            foreach (var world in orginalSong)
            {
                Console.Write(world+" ");
            }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            for(int i = 0; i < input.Length-2; i ++)
            {
                if(input[i] == 'W' && input[i+1] == 'U' && input[i+2] == 'B')
                {
                    input = input.Substring(0, i) + ' ' + input.Substring(i + 3, input.Length - i - 4);
                }
            }

            Console.Write(input.Trim());
        }
    }
}

using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
namespace ConsoleApplication1
{
    class Program
    {
        static long[] num;
        static int n;
        public static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string ris="";
            int pos = 0;
            s = "WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB";
            bool spazio = false;

            while (pos < s.Length)
            {
                if (s.Substring(pos, 3) != "WUB")
                {
                    ris += s[pos];
                    pos++;
                    spazio = true;
                }
                else
                {
                    if (spazio)
                    {
                        ris += " ";
                        spazio = false;
                    }
                    pos += 3;
                }
            }
            Console.WriteLine(ris);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Codefather_is_riseing_ha_ha_ha
{
    class Program
    {
        static void Main(string[] args)
        {
            int chekk = 1;
            string str = Console.ReadLine();
            for (int i = 0; i < str.Length; i++)
            {
                if (i + 2 <= str.Length)
                {
                    if (str[i] == 'W' && str[i + 1] == 'U' && str[i + 2] == 'B') { i = i + 2; if (chekk == 2) { Console.Write(" "); } }
                    else { Console.Write(str[i]); chekk = 2; }
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dubstep
{
    class Program
    {
        static void Main(string[] args)
        {
            string dub="DUB";
            string song = Console.ReadLine();
            string end = ""; int j = 0, i=0;
            while (i<song.Length)
            {
                j = 0;
                while (j<3)
                if (song[i] != dub[j])
                    {
                        end += song[i];
                        j=3;
                        i++;
                    }
                    else
                    {
                        j++;
                        i++;
                    }

            }

            Console.WriteLine(end);
        }
    }
}