#include <iostream>
using namespace std;
int main() {
// your code goes here
string s;
cin >> s;
for ( int I=0;I<s.size();)
{
int j=I;
while((j<s.size())and (s[j]==s[I]))
j++;
if(j==I+1) cout<<s[I];
I=j;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCnN0cmluZyBzOyAKY2luID4+IHM7CmZvciAoIGludCBJPTA7STxzLnNpemUoKTspCnsKICBpbnQgaj1JOyAKd2hpbGUoKGo8cy5zaXplKCkpYW5kIChzW2pdPT1zW0ldKSkKaisrOwppZihqPT1JKzEpIGNvdXQ8PHNbSV07IAogST1qOwp9CglyZXR1cm4gMDsKfQ==