import sys sys.setrecursionlimit(10 ** 6) def II(): return int(sys.stdin.readline()) def LI(): return list(map(int, sys.stdin.readline().split())) def LC(): return list(input()) def IC(): return [int(c) for c in input()] def MI(): return map(int, sys.stdin.readline().split()) INF = float('inf') MOD = 10**9 + 7 def solve(): S = LC() N = len(S) print(S[0],end="") for i in range(1,N): if(S[i]!=S[i-1]): print(S[i], end="") return solve()