using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukikoda { class Program { static void Main(string[] args) { string s = Console.ReadLine(); var li = new List(); int max = 0; string w = ""; int cnt = 0; for (int i = 0; i < s.Length; i++) { if (s[i] == 'w') { cnt = 0; for (int j = i; j < s.Length; j++) { if (s[j] == 'w') cnt++; else break; } if (cnt > max && w.Length != 0) { max = cnt; li.Clear(); } if (cnt == max && w.Length != 0) { li.Add(w); } w = ""; } else { w += s[i]; } } foreach (var item in li) { Console.WriteLine(item); } } } }