S, T, K = input(), [], "" for C in S: if K != C: T.append(C) K = C print("".join(T))