#include using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int n = s.length(); cout << s[0]; for (int i = 1; i < n; i++) { if (s[i - 1] != s[i]) cout << s[i]; } cout << '\n'; return 0; }