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".

Source: codeforces | Difficulty: EASY
Tags: Implementation


Solutions:
def solve(s):
	n = len(s)
	if n == 1:
		return s
	s = list(s)
	memo = {'x': s.count('x'), 'y': s.count('y')}
	if memo['x'] > memo['y']:
		return 'x' * (memo['x'] - memo['y'])
	else:
		return 'y' * (memo['y'] - memo['x'])
s = input()
result = solve(s)
print(result)


x = input()
if 'x' in x:
	ax = x.count('x')
	if 'y' in x:
		ay = x.count('y')
		if ay > ax:
			print('y' * (ay - ax))
		else:
			print('x' * (ax - ay))
	else:
		print(x)
else:
	print(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()
x = s.count('x')
y = s.count('y')
if x > y:
	length = x - y
	char = 'x'
else:
	length = y - x
	char = 'y'
L = [char for i in range(length)]
print(''.join(L))


def main():
	string = input()
	x = string.count('x')
	y = string.count('y')
	if x > y:
		print('x' * (x - y))
	elif y > x:
		print('y' * (y - x))
	else:
		print('')
main()


from sys import stdin, stdout
import bisect as bs
nmbr = lambda : int(stdin.readline())
lst = lambda : list(map(int, stdin.readline().split()))
for _ in range(1):
	s = input()
	n = len(s)
	x = s.count('x')
	y = n - x
	if y >= x:
		for i in range(y - x):
			stdout.write('y')
	else:
		for i in range(x - y):
			stdout.write('x')


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


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


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


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


from math import *
from collections import deque
from copy import deepcopy
import sys

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def multi():
	return map(int, input().split())

def strmulti():
	return map(str, inp().split())

def lis():
	return list(map(int, inp().split()))

def lcm(a, b):
	return a * b // gcd(a, b)

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def stringlis():
	return list(map(str, inp().split()))

def out(var):
	sys.stdout.write(str(var))

def printlist(a):
	print(' '.join((str(a[i]) for i in range(len(a)))))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
s = str(inp())
if s.count('x') > s.count('y'):
	print('x' * abs(s.count('x') - s.count('y')))
else:
	print('y' * abs(s.count('x') - s.count('y')))


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


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
s = input()
x = s.count('x')
y = s.count('y')
if x > y:
	print('x' * (x - y))
else:
	print('y' * (y - x))


string = input()
y = 0
for s in string:
	if s == 'y':
		y += 1
x = len(string) - y
if x > y:
	print('x' * (x - y))
elif y > x:
	print('y' * (y - x))


string = input()
(x, y) = (string.count('x'), string.count('y'))
print('x' * (x - y) if x > y else 'y' * (y - 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 = 0
y = 0
for i in s:
	if i == 'x':
		x += 1
	else:
		y += 1
if x - y >= 0:
	print('x' * (x - y))
else:
	print('y' * (y - x))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if not True else 1):
	s = input()
	(x, y) = (s.count('x'), s.count('y'))
	if x > y:
		print('x' * (x - y))
	else:
		print('y' * (y - x))


L = input()
s1 = L.count('x')
s2 = L.count('y')
x = max(s1, s2)
v = abs(s1 - s2)
if x == L.count('x'):
	print('x' * v)
else:
	print('y' * v)


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)


ans = []
for x in input():
	if len(ans) == 0 or ans[-1] == x:
		ans.append(x)
	else:
		ans.pop()
print(''.join(ans))


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


s = input()
x_count = 0
y_count = 0
for j in range(len(s)):
	if s[j] == 'x':
		x_count += 1
	elif s[j] == 'y':
		y_count += 1
if y_count > x_count:
	print('y' * (y_count - x_count))
elif y_count < x_count:
	print('x' * (x_count - y_count))
else:
	print('')


a = input()
x = 0
y = 0
for c in a:
	if c == 'x':
		x += 1
	else:
		y += 1
if x > y:
	jawaban = 'x' * (x - y)
else:
	jawaban = 'y' * (y - x)
print(jawaban)


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


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


s = input()
k = s.count('x') - s.count('y')
print('x' * k + 'y' * -k)


a = input()
x = a.count('x')
y = len(a) - x
print('yx'[x > y] * abs(x - y))


import sys
import string
from collections import Counter, defaultdict
from math import fsum, sqrt, gcd, ceil, factorial
from operator import *
from itertools import accumulate
inf = float('inf')
flush = lambda : sys.stdout.flush
comb = lambda x, y: factorial(x) // factorial(y) // factorial(x - y)
ip = lambda : input()
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())
s = ip()
x = s.count('x')
y = s.count('y')
m = min(x, y)
x -= m
y -= m
print('x' * x, 'y' * y)


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()
a = s.count('x')
b = s.count('y')
if a > b:
	s = 'x' * (a - b)
else:
	s = 'y' * (b - a)
print(s)


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


str_ = input()
m = min(str_.count('x'), str_.count('y'))
print('x' * (str_.count('x') - m), 'y' * (str_.count('y') - m))


s = input()
x1 = s.count('x')
y1 = s.count('y')
print(['y' * (y1 - x1), 'x' * (x1 - y1)][x1 > y1])


from sys import stdin
from collections import defaultdict
input = stdin.readline
T = 1
for t in range(1, T + 1):
	s = input()
	x = 0
	y = 0
	for i in s:
		x += i == 'x'
		y += i == 'y'
	if x > y:
		for i in range(x - y):
			print('x', end='')
	else:
		for i in range(y - x):
			print('y', end='')


a = list(input())
x = [x for x in a if x != 'y']
y = [x for x in a if x != 'x']
lenx = len(x)
leny = len(y)
m = abs(leny - lenx)
if lenx > leny:
	jawab = 'x'
else:
	jawab = 'y'
print(jawab * m)


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)


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


import math
import sys
3

def change_char_at(ch, s, indx):
	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)
	return s[:indx] + ch + s[indx + 1:]
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))


x = input()
xL = list(x)
equis = 0
ye = 0
f = ''
for q in range(0, len(x)):
	if xL[q] == 'y':
		ye = ye + 1
	elif xL[q] == 'x':
		equis = equis + 1
if equis == ye:
	print(' ')
elif equis > ye:
	m = equis - ye
	for j in range(m):
		f = f + 'x'
elif ye > equis:
	m = ye - equis
	for j in range(m):
		f = f + 'y'
print(f)


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))


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


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


s = input()
(xc, yc) = (s.count('x'), s.count('y'))
print(('x' if xc > yc else 'y') * abs(xc - yc))


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


ls = input()
x = 0
y = 0
for i in ls:
	if i == 'x':
		x += 1
	else:
		y += 1
if x > y:
	dif = x - y
	for _ in range(dif):
		print('x', end='')
elif x < y:
	dif = y - x
	for _ in range(dif):
		print('y', end='')
else:
	print()


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))


a = list(input())
x = [x for x in a if x != 'y']
y = [x for x in a if x != 'x']
if len(x) > len(y):
	print('x' * (len(x) - len(y)))
else:
	print('y' * (len(y) - len(x)))


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


a = list(input())
x = [x for x in a if x != 'y']
y = [x for x in a if x != 'x']
lenx = len(x)
leny = len(y)
if lenx > leny:
	print('x' * (lenx - leny))
else:
	print('y' * (leny - lenx))


from collections import deque as de
import math
import sys
import re
from collections import Counter as cnt
from functools import reduce
from typing import MutableMapping
from itertools import groupby as gb
from fractions import Fraction as fr
from bisect import bisect_left as bl, bisect_right as br

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

class My_stack:

	def __init__(self):
		self.data = []

	def my_push(self, x):
		return self.data.append(x)

	def my_pop(self):
		return self.data.pop()

	def my_peak(self):
		return self.data[-1]

	def my_contains(self, x):
		return self.data.count(x)

	def my_show_all(self):
		return self.data

	def isEmpty(self):
		return len(self.data) == 0
arrStack = My_stack()

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binarytodecimal(n):
	return int(n, 2)

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def get_prime_factors(number):
	prime_factors = []
	while number % 2 == 0:
		prime_factors.append(2)
		number = number / 2
	for i in range(3, int(math.sqrt(number)) + 1, 2):
		while number % i == 0:
			prime_factors.append(int(i))
			number = number / i
	if number > 2:
		prime_factors.append(int(number))
	return prime_factors

def get_frequency(list):
	dic = {}
	for ele in list:
		if ele in dic:
			dic[ele] += 1
		else:
			dic[ele] = 1
	return dic

def Log2(x):
	return math.log10(x) / math.log10(2)

def getProduct(n):
	product = 1
	while n != 0:
		product = product * (n % 10)
		n = n // 10
	return product

def dupconscount(nums):
	element = []
	freque = []
	if not nums:
		return element
	running_count = 1
	for i in range(len(nums) - 1):
		if nums[i] == nums[i + 1]:
			running_count += 1
		else:
			freque.append(running_count)
			element.append(nums[i])
			running_count = 1
	freque.append(running_count)
	element.append(nums[i + 1])
	return (element, freque)

def lcm(x, y):
	lcm = x * y // math.gcd(x, y)
	return lcm

def isPowerOfTwo(n):
	return math.ceil(Log2(n)) == math.floor(Log2(n))

def checkisap(list):
	d = list[1] - list[0]
	for i in range(2, len(list)):
		temp = list[i] - list[i - 1]
		if temp != d:
			return False
	return True

def ceildiv(x, y):
	return (x + y - 1) // y

def di():
	return map(int, input().split())

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def si():
	return list(map(str, input()))

def indic():
	dic = {}
	for (index, value) in enumerate(input().split()):
		dic[int(value)] = int(index) + 1
	return dic
s = input()
xc = s.count('x')
yc = s.count('y')
if xc > yc:
	print('x' * (xc - yc))
else:
	print('y' * (yc - xc))


s = input()
n = len(s)
i = 0
ans = ''
c1 = s.count('x')
c2 = s.count('y')
if c1 > c2:
	ans = 'x' * (c1 - c2)
elif c2 > c1:
	ans = 'y' * (c2 - c1)
else:
	ans = ''
print(ans)


def main():
	string = input()
	lst = list(string)
	if lst.count('y') == 0:
		return string
	lst = ['x'] * lst.count('x') + ['y'] * lst.count('y')
	if lst.count('x') > lst.count('y'):
		index = lst.index('y')
		return ''.join(lst[:index - lst.count('y')])
	elif lst.count('x') < lst.count('y'):
		index = lst.index('y')
		return ''.join(lst[index + lst.count('x'):])
	else:
		return ''
print(main())


n = input()
stack = []
for i in n:
	if stack == []:
		stack.append(i)
	else:
		s = stack.pop()
		if s == 'y' and i == 'x':
			pass
		elif s == 'x' and i == 'y':
			pass
		else:
			stack.append(s)
			stack.append(i)
for i in stack:
	print(i, end='')


s = input()
(count1, count2) = (s.count('x'), s.count('y'))
if count1 > count2:
	element = 'x'
else:
	element = 'y'
print(element * abs(count1 - count2))


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


import sys, threading, os.path
import string
import collections, heapq, math, bisect, operator
sys.setrecursionlimit(10 ** 6)
threading.stack_size(2 ** 27)

def main():
	if os.path.exists('in.txt'):
		input = open('in.txt', 'r')
	else:
		input = sys.stdin
	data = list(str(input.readline().rstrip('\n')))
	(x_s, y_s) = (0, 0)
	for x in data:
		if x == 'x':
			x_s += 1
		else:
			y_s += 1
	to_repeat = ''
	if x_s > y_s:
		to_repeat = 'x'
		x_s -= y_s
		y_s = 0
	else:
		to_repeat = 'y'
		y_s -= x_s
		x_s = 0
	res = ''
	for i in range(max(y_s, x_s)):
		res += to_repeat
	output = res
	if os.path.exists('out.txt'):
		open('out.txt', 'w').writelines(str(output))
	else:
		sys.stdout.write(str(output))
main()


s = input()
x = s.count('x')
y = len(s) - x
print(['y', 'x'][x > y] * abs(y - x))


res = []
s = input()
for i in s:
	if len(res) == 0 or res[-1] == i:
		res.append(i)
	else:
		res.pop()
print(''.join(res))


s = input()
a = s.find('yx')
b = s.find('xy')
if a == -1 and b == -1:
	print(s)
else:
	l = list(s)
	x = l.count('x')
	y = l.count('y')
	d = abs(x - y)
	if x > y:
		print('x' * d)
	else:
		print('y' * d)


n = list(input())
countx = n.count('x')
county = n.count('y')
str1 = str('x' * countx) + str('y' * county)
l = []
l = l + list(str1)
flag = 0
if 'x' in l and 'y' in l:
	flag = 0
	if countx > county:
		print('x' * (countx - county))
	elif countx < county:
		print('y' * (county - countx))
	else:
		print('')
else:
	print(str1)


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


sx = ['x' for a in range(1000000)]
sy = ['y' for a in range(1000000)]
sx = ''.join(sx)
sy = ''.join(sy)
s = input()
x = 0
y = 0
size = len(s)
for a in range(size):
	if s[a] == 'x':
		x += 1
	elif s[a] == 'y':
		y += 1
if x == 0 or y == 0:
	print(s)
elif x > y:
	print(sx[:x - y])
elif y > x:
	print(sy[:y - x])


from collections import Counter
s = Counter(input())
s['x'] = s.get('x', 0)
s['y'] = s.get('y', 0)
m = min(s.values())
print('x' * (s['x'] - m) + 'y' * (s['y'] - m))


n = input()
x = 0
y = 0
for i in n:
	x += i == 'x'
	y += i == 'y'
print((x - y) * 'x' if x > y else (y - x) * 'y')


__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))


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']))