s = input() s2 = [s[0]] for i in range(1, len(s)): if s2[-1] != s[i]: s2.append(s[i]) print("".join(s2))