'''
Created on Aug 8, 2017

@author: anhvu
'''
s = input();
ret = s[0];

for i in range(1, len(s)):
    if s[i] != s[i-1]:
        ret += s[i];

print(ret);
0a60027b0c66f9e0bbe4410d1c5107ebb7cc229b
<mask token>

<mask token>
for i in range(1, len(s)):
    if s[i] != s[i - 1]:
        ret += s[i]
print(ret)

<mask token>
s = input()
ret = s[0]
for i in range(1, len(s)):
    if s[i] != s[i - 1]:
        ret += s[i]
print(ret)

'''
Created on Aug 8, 2017

@author: anhvu
'''
s = input();
ret = s[0];

for i in range(1, len(s)):
    if s[i] != s[i-1]:
        ret += s[i];

print(ret);