S = input() T = [] bk = "" for s in S: if bk!=s: T.append(s) bk = s print("".join(T))