s = input().strip() if not s: print('') else: result = [s[0]] prev_char = s[0] for c in s[1:]: if c != prev_char: result.append(c) prev_char = c print(''.join(result))