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