import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String S = scan.nextLine(); scan.close(); if(S.substring(0, 1).equals("w")) { for(int i = 0; i < S.length(); i++) { if(S.substring(i, i + 1).equals("w")) { continue; }else { S = S.substring(i, S.length()); break; } } } S = S + " "; String []ary = new String[S.length()]; for(int i = 0; i < S.length(); i++) { ary[i] = S.substring(i, i + 1); } int l = ary.length; int max = 0; Listlist = new ArrayList(); int begin = 0; for(int i = 0; i < l; i++) { if(ary[i].equals("w")) { int cnt = 1; int t = i; i++; while(i < l) { if(ary[i].equals("w")) { cnt ++; i++; continue; }else { String s = S.substring(begin, t); begin = i; Data d = new Data(s, cnt); list.add(d); if(max < cnt) { max = cnt; } break; } } } } StringBuilder sb = new StringBuilder(); for(int i = 0; i < list.size(); i++) { if(list.get(i).getN() == max) { sb.append(list.get(i).getS()).append("\n"); } } System.out.print(sb.toString()); } } class Data{ String s; int n; public Data(String s, int n) { this.s = s; this.n = n; } String getS() { return s; } int getN() { return n; } }