cs=[c for c in input()] current = '' deq = collections.deque(cs) for _ in range(len(cs)): tmp = deq.popleft() if current == tmp: continue current = tmp deq.append(tmp) print(''.join(deq))