Little Vitaly loves different algorithms. Today he has invented a new algorithm just for you. Vitaly's algorithm works with string s, consisting of characters "x" and "y", and uses two following operations at runtime:  Find two consecutive characters in the string, such that the first of them equals "y", and the second one equals "x" and swap them. If there are several suitable pairs of characters, we choose the pair of characters that is located closer to the beginning of the string.  Find in the string two consecutive characters, such that the first of them equals "x" and the second one equals "y". Remove these characters from the string. If there are several suitable pairs of characters, we choose the pair of characters that is located closer to the beginning of the string. 

The input for the new algorithm is string s, and the algorithm works as follows:  If you can apply at least one of the described operations to the string, go to step 2 of the algorithm. Otherwise, stop executing the algorithm and print the current string.  If you can apply operation 1, then apply it. Otherwise, apply operation 2. After you apply the operation, go to step 1 of the algorithm. 

Now Vitaly wonders, what is going to be printed as the result of the algorithm's work, if the input receives string s.


-----Input-----

The first line contains a non-empty string s. 

It is guaranteed that the string only consists of characters "x" and "y". It is guaranteed that the string consists of at most 10^6 characters. It is guaranteed that as the result of the algorithm's execution won't be an empty string.


-----Output-----

In the only line print the string that is printed as the result of the algorithm's work, if the input of the algorithm input receives string s.


-----Examples-----
Input
x

Output
x

Input
yxyxy

Output
y

Input
xxxxxy

Output
xxxx



-----Note-----

In the first test the algorithm will end after the first step of the algorithm, as it is impossible to apply any operation. Thus, the string won't change.

In the second test the transformation will be like this:  string "yxyxy" transforms into string "xyyxy";  string "xyyxy" transforms into string "xyxyy";  string "xyxyy" transforms into string "xxyyy";  string "xxyyy" transforms into string "xyy";  string "xyy" transforms into string "y". 

As a result, we've got string "y". 

In the third test case only one transformation will take place: string "xxxxxy" transforms into string "xxxx". Thus, the answer will be string "xxxx".

Difficulty: interview

Starter code:

Solutions:
s = input()
a, b = s.count('x'), s.count('y')
if b > a: print('y' * (b - a))
else: print('x' * (a - b))

l = list(input())
x = l.count('x')
y = l.count('y')
print('x' * (x - y) if x > y else 'y' * (y - x))

s = input().strip()
counter = {'x': 0, 'y': 0}
for ch in s:
	counter[ch] += 1
diff = counter['x'] - counter['y']
if (diff >= 0):
	print("".join(['x'] * diff))
else:
	diff = - diff
	print("".join(['y'] * diff))
		


s = input()
a = s.count('x')
b = s.count('y')
if a>b:
    s = 'x'*(a-b)
else:
    s = 'y'*(b-a)

print(s)


import sys
import math
  
st = sys.stdin.readline()

d = [0] * 2
for i in st:
    if(i != '\n'):
        d[ord(i) - 120] += 1
        
if(d[0] - d[1] > 0):
    t = ['x'] * (d[0] - d[1])
    print("".join(t))
elif(d[1] - d[0] > 0):
    t = ['y'] * (d[1] - d[0])
    print("".join(t))

x,y=list(map(input().count,'xy'));
if x>y:
 print(((x-y)*'x'));
else:
  print(((y-x)*'y'));





s = input()
x = s.count('x')
y = s.count('y')
if x > y:
	print('x' * (x - y))
else:
	print('y' * (y - x))


ins=input()
kol_x=0
kol_y=0
for ii in ins:
    if ii=='x': kol_x+=1
    else: kol_y+=1
if kol_x>kol_y:
    print('x'*(kol_x-kol_y))
else:
    print('y'*(kol_y-kol_x))


S = input()

ctr = 0

for i in S:
	if(i=="x"):
		ctr+=1
	else:
		ctr-=1

if(ctr<0):
	print("y"*(-ctr))
else:
	print("x"*ctr)

__author__ = "runekri3"

s = input()

x_count = s.count("x")
y_count = s.count("y")
if x_count > y_count:
    char = "x"
else:
    char = "y"
print(char * abs(x_count - y_count))


def main():
    stack = []
    for c in input():
        if stack and stack[-1] != c:
            del stack[-1]
        else:
            stack.append(c)
    print(''.join(reversed(stack)))


def __starting_point():
    main()

__starting_point()

s,x,y=input(),0,0
for i in range(len(s)):
    if s[i]=='x':
        x+=1
    else:
        y+=1
print((x-y)*'x' if x>y else (y-x)*'y')


from collections import Counter
s=input()
c=Counter(s)
if c['x']>c['y']:
  print('x'*(c['x']-c['y']))
else:
  print('y'*(c['y']-c['x']))



a=input()
x=a.count('x')
y=a.count('y')
if x>y:
    print('x'*(x-y))
else:
    print('y'*(y-x))


s = input()
x, y = s.count("x"), s.count("y")
if x > y:
  print("x"*(x-y))
else:
  print("y"*(y-x))

def code_parsing(string):
    string = ''.join(sorted(string))

    x = string.count("x")
    y = string.count("y")

    if x > y:
        return "x" * (x - y)
    elif x < y:
        return "y" * (y - x)
    else:
        return ""

s = input()
print(code_parsing(s))



#"from dust i have come, dust i will be"

s=input()

x=0;y=0

for i in range(len(s)):
    if(s[i]=='x'):
        x+=1
    else:
        y+=1

t=""
if(x>y):
    for i in range(x-y):
        t+="x"

else:
    for i in range(y-x):
        t+="y"

print(t)

n = sum([{'x':1, 'y':-1}[c] for c in input()])
print(n * 'x' if n > 0 else -n * 'y')


n = sum([{'x':1, 'y':-1}[c] for c in input()])
print(n * 'x' + -n * 'y')


n = sum([{'x':1, 'y':-1}[c] for c in input()])
print(n * 'x' + -n * 'y')


s = input()
x = s.count("x")
y = s.count("y")

if x > y:
    print("x"*(x-y))
else:
    print("y"*(y-x))

s=input()
k1=s.count('x')
k2=s.count('y')
if k1>k2:
    print('x'*(k1-k2))
else:
    print('y'*(k2-k1))


from collections import Counter
def get_ans():
    c = Counter(input())
    x = c['x']
    y = c['y']
    if x > y:
        return 'x'*(x-y)
    elif y > x:
        return 'y'*(y-x)
    else:
        return ''
ans = get_ans()
print(ans)

import math
import sys
3

def change_char_at(ch, s, indx):
    """
    Strings in Python are immutable objects. So, it is not possible to change a
    certain character in a string in place. For example, an attempt to run the
    following code will fail with a TypeError:

        s = "spam"
        s[1] = "z" # TypeError: 'str' object does not support item assignment

    What this function does is it provides you with a nice interface when you
    want to change a character in a string at a certain index position. So, use
    this function instead of doing everything manually which can sometimes be
    tricky. Notice that the character parameter does not necessarily have to be
    one character long. It can be an empty string which means that a character
    at a certain position will effectively be deleted from the string. If it's
    more than one character long, then they all will be inserted into the string
    starting at the specified index position.

    Parameters:
    ch:   character to insert
    s:    string to insert into
    indx: index position where to insert the character
    """
    # Error handling
    if type(ch) is not str:
        raise TypeError("first argument must be a string")
    if type(s) is not str or not len(s) > 0:
        raise TypeError("second argument must be a non-empty string")

    length = len(s) - 1
    if not(indx >= 0 and indx <= length):
        msg  = "string index out of range; "
        msg += "attempt to access index at {0}; ".format(indx)
        msg += "allowable index range 0 to {0}".format(length)
        raise IndexError(msg)

    # Actual function logic
    return s[:indx] + ch + s[indx + 1:]
    """
    Another possible implementation:

        ls       = list(s)
        ls[indx] = ch
        return ''.join(ls)

    This works well too and is equally good, but might be conspired unpythonic
    by some compared to the one right above it.
    """



s=input()
x=0
y=0
for i in range(0,len(s)):
        
        if(s[i]=='y'):
           y+=1
        elif(s[i]=='x'):
           x+=1;
if(x-y>0):
     print("x"*(x-y))
           
else:
     print("y"*(y-x))