Polycarp thinks about the meaning of life very often. He does this constantly, even when typing in the editor. Every time he starts brooding he can no longer fully concentrate and repeatedly presses the keys that need to be pressed only once. For example, instead of the phrase "how are you" he can type "hhoow aaaare yyoouu". 

Polycarp decided to automate the process of correcting such errors. He decided to write a plug-in to the text editor that will remove pairs of identical consecutive letters (if there are any in the text). Of course, this is not exactly what Polycarp needs, but he's got to start from something! 

Help Polycarp and write the main plug-in module. Your program should remove from a string all pairs of identical letters, which are consecutive. If after the removal there appear new pairs, the program should remove them as well. Technically, its work should be equivalent to the following: while the string contains a pair of consecutive identical letters, the pair should be deleted. Note that deleting of the consecutive identical letters can be done in any order, as any order leads to the same result. 

Input

The input data consists of a single line to be processed. The length of the line is from 1 to 2·105 characters inclusive. The string contains only lowercase Latin letters. 

Output

Print the given string after it is processed. It is guaranteed that the result will contain at least one character.

Examples

Input

hhoowaaaareyyoouu


Output

wre

Input

reallazy


Output

rezy

Input

abacabaabacabaa


Output

a
import static java.lang.Math.*;
import java.util.*;
import java.io.*;

public class yandex_q1_A {

    public void solve() throws Exception {
        String s = nextWord();
        StringBuilder sb = new StringBuilder();
        
        for (int i=0; i<s.length(); i++)
            if (sb.length()>0 && sb.charAt(sb.length()-1)==s.charAt(i)) sb.deleteCharAt(sb.length()-1);
            else sb.append(s.charAt(i));
        
        println(sb.toString());
    }
    
    

    ////////////////////////////////////////////////////////////////////////////    

    double EPS = 1e-7;
    int INF = Integer.MAX_VALUE;
    long INFL = Long.MAX_VALUE;
    double INFD = Double.MAX_VALUE;

    int[] dx = {0,1,0,-1};
    int[] dy = {-1,0,1,0};
    int[] dx8 = {0,1,1,1,0,-1,-1,-1};
    int[] dy8 = {-1,-1,0,1,1,1,0,-1};
    int[] knightMovesX = {1,2,2,1,-1,-2,-2,-1};
    int[] knightMovesY = {-2,-1,1,2,2,1,-1,-2};

    class Point {
        int x,y;
        public Point(int xx, int yy) {
            x=xx; y=yy;
        }
        public double dist(Point p) {
            return sqrt((x-p.x)*(x-p.x)+(y-p.y)*(y-p.y));
        }
    }
    class PointL {
        long x,y;
        public PointL(long xx, long yy) {
            x=xx; y=yy;
        }
        public double dist(PointL p) {
            return sqrt((x-p.x)*(x-p.x)+(y-p.y)*(y-p.y));
        }
    }
    class PointD {
        double x,y;
        public PointD(double xx, double yy) {
            x=xx; y=yy;
        }
        public double dist(PointD p) {
            return sqrt((x-p.x)*(x-p.x)+(y-p.y)*(y-p.y));
        }
    }
    double dist(int x, int y, int xx, int yy) {
        return sqrt((xx-x)*(xx-x)+(yy-y)*(yy-y));
    }
    double dist(long x, long y, long xx, long yy) {
        return sqrt((xx-x)*(xx-x)+(yy-y)*(yy-y));
    }
    double dist(double x, double y, double xx, double yy) {
        return sqrt((xx-x)*(xx-x)+(yy-y)*(yy-y));
    }


    @SuppressWarnings("serial")
    class IncMap extends HashMap<Object, Integer> {
        boolean add(Object key) {
            Integer i = get(key);
            if (i!=null) {
                put(key, i+1);
                return false;
            } else {
                put(key, 1);
                return true;
            }
        }
    }
    

    int min(int... nums) {
        int r = INF;
        for (int i: nums)
            if (i<r) r = i;
        return r;
    }
    int max(int... nums) {
        int r = -INF;
        for (int i: nums)
            if (i>r) r = i;
        return r;
    }
    long minL(long... nums) {
        long r = INFL;
        for (long i: nums)
            if (i<r) r = i;
        return r;
    }
    long maxL(long... nums) {
        long r = -INFL;
        for (long i: nums)
            if (i>r) r = i;
        return r;
    }
    
    int digitSum(long i) {
        i = abs(i);
        int r = 0;
        while (i>0) {
            r+=i%10;
            i/=10;
        }
        return r;
    }
    long digitProd(long i) {
        if (i==0) return 0;
        i = abs(i);
        long r = 1;
        while (i>0) {
            r*=i%10;
            i/=10;
        }
        return r;
    }
    
    double log2(long i) {
        return log(i)/log(2);
    }
    double log2(double i) {
        return log(i)/log(2);
    }
    long binpow(int x, int n) {
        long r = 1;
        while (n>0) {
            if ((n&1)!=0) r*=x;
            x*=x;
            n>>=1;
        }
        return r;
    }
    
    
    int[] months = {0,31,28,31,30,31,30,31,31,30,31,30,31};
    boolean isLeapYear(int y) {
        return y%4==0 && (y%400==0 || y%100!=0);
    }
    boolean isValidDate(int d, int m, int y) {
        if (isLeapYear(y) && m==2 && d==29) return true;
        return m>0 && m<=12 && d>0 && d<=months[d];
    }
    int[] nextDay(int d, int m, int y) {
        if (d>=months[m])
            if (m==2 && d==28 && isLeapYear(y)) d++;
            else {d=1; m++;}
        else
            d++;
        if (m==13) {d=1; m=1; y++;}
        return new int[] {d,m,y};
    }


    long timer = System.currentTimeMillis();
    void startTimer() {
        timer = System.currentTimeMillis();
    }
    void stopTimer() {
        System.err.println("time: "+(System.currentTimeMillis()-timer)/1000.0);
    }


    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));

    String nextLine() throws IOException {
        return in.readLine();
    }
    String nextWord() throws IOException {
        StringBuilder sb = new StringBuilder();
        int c = 0;
        while (c<=' ') c=in.read();
        while (c>' ') {
            sb.append((char)c);
            c = in.read();
        }
        return sb.toString();
    }
    int nextInt() throws NumberFormatException, IOException {
        return Integer.parseInt(nextWord());
    }
    long nextLong() throws NumberFormatException, IOException {
        return Long.parseLong(nextWord());
    }
    double nextDouble() throws NumberFormatException, IOException {
        return Double.parseDouble(nextWord());
    }

    void print(Object o) throws IOException {
        out.write(o.toString());
    }
    void println(Object o) throws IOException {
        out.write(o.toString());
        out.newLine();
    }
    void print(Object... o) throws IOException {
        out.write(o[0].toString());
        for (int i=1; i<o.length; i++)
            out.write(" "+o[i].toString());
    }
    void println(Object... o) throws IOException {
        print(o);
        out.newLine();
    }

    void debug(Object... o) {
        System.err.println(Arrays.deepToString(o));
    }

    public static void main(String[] args) throws Exception {
        Locale.setDefault(Locale.US);
        new yandex_q1_A().solve();
        out.flush();
        out.close(); in.close();
    }
}
