mod = 1000000007 eps = 10**-9 def main(): import sys input = sys.stdin.readline S = input().rstrip('\n') ans = [S[0]] for i in range(1, len(S)): if S[i] != S[i-1]: ans.append(S[i]) print("".join(ans)) if __name__ == '__main__': main()