s = input() ans = s[0] pre = s[0] print(s[0], end='') if len(s) != 1: for i in range(1, len(s)): if pre != s[i]: print(s[i], end='') pre = s[i]