#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { const vector tmp = {0xEF, 0xBD, 0x97}; vector > s; int len = 0; int maxLen = 0; for(;;){ vector v(1); if(!(cin >> v[0])) break; int n = 0; while(v[0] & (1 << (7 - n))) ++ n; n = max(n, 1); v.resize(n); for(int i=1; i> v[i]; s.push_back(v); if(v == tmp){ ++ len; if(len != s.size()) maxLen = max(maxLen, len); } else{ len = 0; } } if(maxLen == 0) return 0; vector > > ans; int i = s.size() - 1; while(i >= 0){ int j = i; while(j >= 0 && s[j] == tmp) -- j; int k = j; while(k >= 0 && s[k] != tmp) -- k; if(i - j == maxLen && j - k > 0){ vector > v(s.begin() + 1 + k, s.begin() + 1 + j); ans.push_back(v); } i = k; } reverse(ans.begin(), ans.end()); for(unsigned i=0; i