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 l = 0; int maxi = -1; 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 != ""){ que.add(tmp); 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(""); }else{ while(!que.isEmpty()){ System.out.println(que.element()); que.remove(); } } } }