N=input() from collections import deque tmp="" ans=deque([]) for i in N: if tmp==i: continue else: tmp=i ans.append(tmp) print("".join(ans))