S = input() l = [] now = "" for i in range(len(S)): if now == S[i]: continue l.append(S[i]) now = S[i] print("".join(l))