import sys import math from math import sin, cos, tan from functools import reduce from collections import deque import heapq sys.setrecursionlimit(1000000) intm1 = lambda x:int(x)-1 S = input() N = len(S) T = S[0] i = 1 while i < N: if S[i] == T[-1]: i += 1 continue T += S[i] i += 1 print(T)