using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Text.RegularExpressions; using System.Linq; class Magatro { static void Main() { string ans = ""; string S = Console.ReadLine(); int max = 0; int cnt = 0; string d = ""; string be = ""; for(int i = 0; i < S.Length; i++) { if (S[i] == 'w') { if (cnt == 0) { be = d; } cnt++; d = ""; } else { if (d == "") { if (cnt > max&&be!="") { max = cnt; ans = be; } else if(cnt==max) { ans +="\n"+ be; } } d += S[i]; cnt = 0; } } if (cnt > max && be != "") { max = cnt; ans = be; } else if (cnt == max) { ans += " " + be; } Console.WriteLine(ans); } }