#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); string S; cin >> S; vector ans; int N = S.size(); int ma = 0; rep(i,N) { while(i < N && S.substr(i, 3) == "w") i += 3; int j = i; while(i < N && S.substr(i, 3) != "w") i++; string T = S.substr(j, i - j); j = i; while(i < N && S.substr(i, 3) == "w") i += 3; if(ma < i - j) { ma = i - j; ans.clear(); ans.push_back(T); i--; } else if(ma == i - j) { ans.push_back(T); } } if(ma == 0) { cout << "\n"; } else { for(auto a : ans) cout << a << "\n"; } }