// Arup Guha
// 1/23/2026
// Solution to COP 4516 Kattis Contest 2 Problem A: Apaxiaaaaaaaaaaaans!
// https://open.kattis.com/problems/apaxiaaans

import java.util.*;

public class apaxiaaans {

	public static void main(String[] args) {

		// Get input.
		Scanner stdin = new Scanner(System.in);
		char[] s = stdin.next().toCharArray();
		
		// Loop through letters.
		int i = 0;
		while (i < s.length) {
			int j = i;
			
			// Skip repeats...then output.
			while (j<s.length && s[j] == s[i]) j++;
			System.out.print(s[i]);
			
			// Update start.
			i = j;
		}
		
		System.out.println();
	}
}