import java.util.*;
import java.lang.*;
import java.io.*;
public class Main
{
static int length;
static boolean del = false;
static boolean done = false;
public static void main (String[] args) throws java.lang.Exception
{
Scanner scanner = new Scanner(System.in);
String input = scanner.next();
StringBuilder builder = new StringBuilder(input);
while(!done){
done = true;
for(int i = 0; i < builder.length()-1; i++) {
while(i+1<builder.length() && builder.charAt(i)==builder.charAt(i+1)){
builder.deleteCharAt(i+1);
del = true;
done = false;
}
if(del){
builder.deleteCharAt(i);
del = false;
}
}
}
System.out.println(builder.toString());
}
}