#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main() { string s, t = ""; cin >> s; for (int i = 0; i < s.size() -1; i++){ if (s[i] != s[i+1]) t += s[i]; } t += s[s.size() -1]; cout << t << endl; }