#include using namespace std; int main() { string S; cin >> S; deque d; d.push_back(S.at(0)); for (int i = 1; i < (int)S.size(); i++) { if (d.back() != S.at(i)) d.push_back(S.at(i)); } for (char C : d) cout << C; cout << endl; }