#include using namespace std; using ll = long long; int main(){ char p='#'; string S; cin >> S; for (auto x : S){ if (p != x) cout << x; p = x; } cout << endl; return 0; }