from itertools import groupby S = input() S_unique = ''.join(k for k, g in groupby(S)) print(S_unique)