import java.math.BigInteger; import java.util.ArrayDeque; import java.util.Queue; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s = sc.nextLine(); int wcnt = 0; for(int i = 0;i < s.length();i++){ if(s.charAt(i) == 'w')wcnt++; } if(wcnt == 0 || wcnt == s.length()){ System.out.println(""); return; } int l = 0; int maxi = 0; String tmp = "",maxs = new String(); Queue que = new ArrayDeque(); int i = 0; for(;i < s.length();){ l = 0; while(i < s.length() && s.charAt(i) != 'w'){ tmp = tmp + s.charAt(i); i++; } while(i < s.length() && s.charAt(i) == 'w'){ l++; i++; } if(l > maxi && tmp != ""){ maxi = l; while(!que.isEmpty()){ que.remove(); } que.add(tmp); tmp = ""; }else if(l == maxi && tmp != "" && l != 0){ que.add(tmp); tmp = ""; }else{ tmp = ""; } } if(l > maxi && tmp != ""){ maxi = l; while(!que.isEmpty()){ que.remove(); } que.add(tmp); tmp = ""; }else if(l == maxi && tmp != ""){ que.add(tmp); tmp = ""; } if(que.size() == 0){ System.out.println(""); } while(!que.isEmpty()){ System.out.println(que.element()); que.remove(); } } }