import itertools L = list(input()) GB = itertools.groupby(L) ANS = [] for k,v in GB: ANS.append(k) print(''.join(map(str, ANS)))