#include using namespace std; signed main(){ string S; cin >> S; int cnt = 0; priority_queue< tuple< int, int, string > > ans; string cur; for( int i = 0; i < S.size() - 2; ++i ){ if( S[ i ] == -17 and S[ i + 1 ] == -67 and S[ i + 2 ] == -105 ){ i += 2; ++cnt; } else{ if( cnt > 0 and not cur.empty() ){ ans.emplace( cnt, 10000 - i, cur ); cur.clear(); } cnt = 0; cur += S[ i ]; } } if( cnt > 0 and not cur.empty() ) ans.emplace( cnt, 0, cur ); int maxc = -1; while( not ans.empty() ){ int c, r; string s; tie( c, r, s ) = ans.top(); ans.pop(); if( maxc > c ) break; maxc = c; cout << s << endl; } return 0; }