str = input() ans=str[0] for i in range(1, len(str)): if str[i-1] != str[i]: ans += str[i] print(ans)