import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); char[] s = sc.next().toCharArray(); sc.close(); StringBuilder sb = new StringBuilder(); sb.append(s[0]); for (int i = 1; i < s.length; i++) { if (s[i - 1] != s[i]) { sb.append(s[i]); } } System.out.println(sb.toString()); } }