#include using namespace std; #include "testlib.h" string s, u; int main() { registerValidation(); s = inf.readString(); inf.readEof(); for(auto &c : s) { assert('a' <= c and c <= 'z'); } for(int i = 0; i < (int)s.size() - 2; i++) { if(s[i] == s[i + 1] and s[i + 1] == s[i + 2]) assert(false); } u = s[0]; for(int i = 1; i < (int)s.size(); i++) if(s[i - 1] != s[i]) u += s[i]; cout << u << endl; }