pre = '$' ans = [] for c in input(): if c == pre: continue else: ans.append(c) pre = c print(''.join(ans))