#include using namespace std; int main(){ string s; cin >> s; string t = ""; for(char c : s){ if(t == "" || t[t.length()-1] != c) t += c; } cout << t << endl; return 0; }