using System; using System.Linq; using System.Text.RegularExpressions; public static class P { static void Main() { var s = Console.ReadLine().TrimStart('w'); var maxLen = Regex.Match(s, @"w+").Captures.Max(x => x.Value.Length); var res = Regex.Matches(s, $@"([^w]+)w{{{maxLen}}}").Select(x => x.Groups[1].Value).ToArray(); Console.WriteLine(string.Join(" ", res)); } }