S = input() stack = [S[0]] for i in range(1, len(S)): if S[i] != S[i - 1]: stack += [S[i]] print("".join(stack))