S = input() ans = [] pre = -1 for s in S: if s == pre: continue ans.append(s) pre = s print(*ans, sep="")