#include using namespace std; int main(void){ string s; cin >> s; int N = s.length(); for( int i = 0; i < N-1; i++ ) { if( s[i] != s[i+1] ) cout << s[i]; } cout << s[N-1] << endl; }