Stepan likes to repeat vowel letters when he writes words. For example, instead of the word "pobeda" he can write "pobeeeedaaaaa".

Sergey does not like such behavior, so he wants to write a program to format the words written by Stepan. This program must combine all consecutive equal vowels to a single vowel. The vowel letters are "a", "e", "i", "o", "u" and "y".

There are exceptions: if letters "e" or "o" repeat in a row exactly 2 times, like in words "feet" and "foot", the program must skip them and do not transform in one vowel. For example, the word "iiiimpleeemeentatiioon" must be converted to the word "implemeentatioon".

Sergey is very busy and asks you to help him and write the required program.


-----Input-----

The first line contains the integer n (1 ≤ n ≤ 100 000) — the number of letters in the word written by Stepan.

The second line contains the string s which has length that equals to n and contains only lowercase English letters — the word written by Stepan.


-----Output-----

Print the single string — the word written by Stepan converted according to the rules described in the statement.


-----Examples-----
Input
13
pobeeeedaaaaa

Output
pobeda

Input
22
iiiimpleeemeentatiioon

Output
implemeentatioon

Input
18
aeiouyaaeeiioouuyy

Output
aeiouyaeeioouy

Input
24
aaaoooiiiuuuyyyeeeggghhh

Output
aoiuyeggghhh

Source: codeforces | Difficulty: MEDIUM_HARD
Tags: String algorithms

Implementation


Solutions:
import math
from sys import stdin, stdout
fin = stdin
fout = stdout
n = int(fin.readline().strip())
s = fin.readline().strip()
ans = []
gl = frozenset({'a', 'e', 'i', 'y', 'o', 'u'})
met = False
cdel = False
for i in range(n):
	if i > 0:
		if s[i] != s[i - 1]:
			met = False
			cdel = False
			ans.append(s[i])
		elif s[i] in gl:
			if s[i] == 'e' or s[i] == 'o':
				if not met:
					ans.append(s[i])
				elif not cdel:
					ans.pop()
					cdel = True
			met = True
		else:
			ans.append(s[i])
	else:
		ans.append(s[i])
fout.write(''.join(ans))


def __starting_point():
	vowels = ['a', 'e', 'i', 'o', 'u', 'y']
	n = int(input())
	word = input()
	answer = ''
	i = 0
	s_count = 1
	while i < n:
		symbol = word[i]
		if i == n - 1:
			if s_count == 2 and (symbol == 'e' or symbol == 'o'):
				answer += symbol + symbol
				s_count = 1
			else:
				answer += symbol
		elif symbol == word[i + 1] and symbol in vowels:
			s_count += 1
		elif s_count == 2 and (symbol == 'e' or symbol == 'o'):
			answer += symbol + symbol
			s_count = 1
		elif s_count > 1 and symbol in vowels:
			s_count = 1
			answer += symbol
		else:
			s_count = 1
			answer += symbol
		i += 1
	print(answer)
__starting_point()


odd = input()
s = input()
res = ''
vows = 'aeiouy'
e = 'eo'
a = []
pr = '@'
for ch in s:
	if pr == ch:
		a[-1] += ch
	else:
		a.append(str(ch))
	pr = ch
for g in a:
	if len(g) == 1 or (len(g) == 2 and g[0] in e) or g[0] not in vows:
		res += g
	else:
		res += g[0]
print(res)


def end(r, curr_s, curr_l):
	if curr_l == 0:
		return
	if (curr_s == 'o' or curr_s == 'e') and curr_l == 2:
		r.append(curr_s * 2)
	else:
		r.append(curr_s)

def main():
	n = int(input())
	s = input()
	glasnie = 'aeiouy'
	curr_s = ''
	curr_l = 0
	r = []
	for e in s:
		if e in glasnie:
			if e != curr_s:
				end(r, curr_s, curr_l)
				curr_s = e
				curr_l = 1
			else:
				curr_l += 1
		else:
			end(r, curr_s, curr_l)
			r.append(e)
			curr_s = ''
			curr_l = 0
	end(r, curr_s, curr_l)
	print(''.join(r))
main()


a = input()
inp = input()
a = []
ans = ''
for i in range(len(inp)):
	if i < len(a):
		continue
	if inp[i] != 'a' and inp[i] != 'e' and (inp[i] != 'i') and (inp[i] != 'o') and (inp[i] != 'u') and (inp[i] != 'y'):
		a.append(1)
		continue
	if i <= len(inp) - 3 and inp[i] == inp[i + 1] and (inp[i] == inp[i + 2]):
		a.append(1)
		for k in range(i + 1, len(inp)):
			if inp[k] == inp[k - 1]:
				a.append(0)
			else:
				break
		continue
	if i <= len(inp) - 3 and inp[i] == inp[i + 1] and (inp[i] != inp[i + 2]):
		if inp[i] == 'o' or inp[i] == 'e':
			a.append(1)
			a.append(1)
			continue
		else:
			a.append(1)
			a.append(0)
			continue
	elif i == len(inp) - 2:
		if inp[i] == inp[i + 1] and inp[i] != 'o' and (inp[i] != 'e'):
			a.append(1)
			a.append(0)
		else:
			a.append(1)
			a.append(1)
		break
	a.append(1)
ans = ''
for i in range(len(a)):
	if a[i] == 1:
		ans += inp[i]
print(ans)


from sys import stdin
line = stdin.readline()
line = stdin.readline()
i = 0
ans = ''
while i < len(line):
	if line[i] not in ['a', 'e', 'i', 'o', 'u', 'y'] or i == 0 or line[i] != line[i - 1] or ((line[i] == 'e' or line[i] == 'o') and (i < 2 or line[i] != line[i - 2]) and (i + 1 == len(line) or line[i] != line[i + 1])):
		ans = ans + line[i]
	i = i + 1
print(ans)


n = int(input())
s = list(input())
ans = ''
vowels = ['a', 'e', 'i', 'o', 'u', 'y']
prev = ''
eo = False
for i in range(0, s.__len__()):
	if s[i] in vowels:
		if s[i] != prev:
			ans += s[i]
			eo = False
		elif not eo:
			if i != s.__len__() - 1:
				if prev == s[i] == 'e' and s[i + 1] == 'e' or (prev == s[i] == 'o' and s[i + 1] == 'o'):
					eo = True
				elif prev == s[i] == 'e' and s[i + 1] != 'e' or (prev == s[i] == 'o' and s[i + 1] != 'o'):
					eo = True
					ans += prev
			elif prev == s[i] == 'e' or prev == s[i] == 'o':
				ans += prev
	else:
		eo = False
		ans += s[i]
	prev = s[i]
print(ans)


abc = input()
s = '1' + input() + '1'
glas = ['a', 'e', 'i', 'o', 'u', 'y']
print(s[1], end='')
for i in range(2, len(s) - 1):
	if s[i] != s[i - 1] or s[i] not in glas:
		print(s[i], end='')
	elif (s[i] == 'o' or s[i] == 'e') and s[i + 1] != s[i] and (s[i - 2] != s[i]):
		print(s[i], end='')


import sys
import math
vowel = 'aeiouy'
oe = 'oe'

def main():
	n = int(sys.stdin.readline().strip())
	s = sys.stdin.readline().strip()
	s += '#'
	res = []
	i = 0
	while True:
		if i >= n:
			break
		res.append(s[i])
		if s[i] in vowel:
			if s[i] in oe and s[i + 1] == s[i] and (s[i + 2] != s[i]):
				res.append(s[i])
				i += 2
			else:
				j = i
				while s[i] == s[j]:
					i += 1
		else:
			i += 1
	print(''.join(res))
main()


n = int(input())
s = input()
d = ('a', 'e', 'y', 'u', 'i', 'o')
prev = 'p'
ans = []
count = 1
for i in range(n):
	if s[i] == prev and s[i] in d:
		count += 1
		if (s[i] == 'o' or s[i] == 'e') and count == 2:
			if i == len(s) - 1:
				ans.append(s[i])
			elif s[i + 1] != s[i]:
				ans.append(s[i])
		continue
	ans.append(s[i])
	count = 1
	prev = s[i]
print(''.join(ans))


import sys
input = sys.stdin.readline

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

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

def isprime(n):
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			return 0
	return 1

def main():
	n = int(input())
	s = input()
	d = {}
	d['a'] = d['e'] = d['i'] = d['o'] = d['u'] = d['y'] = 0
	i = 0
	while i < n:
		if s[i] in d.keys():
			c = 1
			while i + 1 < n and s[i] == s[i + 1]:
				i += 1
				c += 1
			if s[i] == 'e' or s[i] == 'o':
				if c > 2:
					print(s[i], end='')
				else:
					print(s[i] * c, end='')
			else:
				print(s[i], end='')
		else:
			print(s[i], end='')
		i += 1
main()


n = int(input())
s = input()
ans = ''
now = 0
last = '#'
nowe = ''
nowo = ''
a = ['a', 'e', 'i', 'o', 'u', 'y']
b = ['e', 'o']
for i in range(n):
	if s[i] == 'e':
		last = 'e'
		if len(nowo) > 2:
			ans += 'o'
		else:
			ans += nowo
		nowo = ''
		nowe += 'e'
	if s[i] == 'o':
		last = 'o'
		if len(nowe) > 2:
			ans += 'e'
		else:
			ans += nowe
		nowe = ''
		nowo += 'o'
	if s[i] not in a:
		if len(nowo) > 2:
			ans += 'o'
		else:
			ans += nowo
		nowo = ''
		if len(nowe) > 2:
			ans += 'e'
		else:
			ans += nowe
		nowe = ''
		ans += s[i]
		last = '#'
		continue
	if s[i] not in b:
		if len(nowo) > 2:
			ans += 'o'
		else:
			ans += nowo
		nowo = ''
		if len(nowe) > 2:
			ans += 'e'
		else:
			ans += nowe
		nowe = ''
		if last != s[i]:
			last = s[i]
			ans += s[i]
		continue
if len(nowo) > 2:
	ans += 'o'
else:
	ans += nowo
	nowo = ''
if len(nowe) > 2:
	ans += 'e'
else:
	ans += nowe
	nowe = ''
print(ans)


n = int(input())
s = input()
w = 'aeiouy'
ans = ''
last = '.'
k = 0
i = 0
while i < n:
	p = s[i]
	if i == n - 1:
		ans += s[i]
		break
	if w.count(s[i]) == 0:
		ans += s[i]
		i += 1
		continue
	k = i
	while k < n and s[k] == s[i]:
		k += 1
	if k - i == 2 and (s[i] == 'o' or s[i] == 'e'):
		ans += s[i]
		ans += s[i]
	else:
		ans += s[i]
	i = k
print(ans)


n = int(input())
s = str(input())
glas = set('aoyuei')
prev = 0
ans = s[0:1]
for i in range(1, n):
	if s[i:i + 1] == s[i - 1:i] and s[i:i + 1] in glas:
		if prev == 0:
			if s[i:i + 1] == 'o' or s[i:i + 1] == 'e':
				if i < n - 1:
					if s[i + 1:i + 2] != s[i:i + 1]:
						ans += s[i:i + 1]
				else:
					ans += s[i:i + 1]
		prev = 1
	else:
		prev = 0
		ans += s[i:i + 1]
print(ans)


input()
s = input()
n = len(s)
a = ['a', 'e', 'u', 'i', 'o', 'y']
k = 1
for i in range(1, n):
	if s[i] == s[i - 1] and s[i] in a:
		k += 1
	else:
		print(s[i - 1], end='')
		if k == 2 and (s[i - 1] == 'o' or s[i - 1] == 'e'):
			print(s[i - 1], end='')
		k = 1
print(s[n - 1], end='')
if k == 2 and (s[i - 1] == 'o' or s[i - 1] == 'e'):
	print(s[n - 1], end='')


bad = ['e', 'a', 'i', 'o', 'u', 'y']
n = int(input())
s = input()
ans = ''
i = 0
while i != len(s):
	if s[i] in bad:
		letter = s[i]
		pos = i
		while i != len(s) and letter == s[i]:
			i += 1
		if i - pos == 2 and letter in ['e', 'o']:
			ans += 2 * letter
		else:
			ans += letter
	else:
		ans += s[i]
		i += 1
print(ans)


import re
n = input()
s = input()
s = re.sub('[a]+', 'a', s)
s = re.sub('[o]{3,}', 'o', s)
s = re.sub('[e]{3,}', 'e', s)
s = re.sub('[u]+', 'u', s)
s = re.sub('[y]+', 'y', s)
s = re.sub('[i]+', 'i', s)
print(s)


n = input()
s = input()
x = ''
x += s[0]
for i in range(1, len(s)):
	if s[i] != s[i - 1]:
		x += ' '
		x += s[i]
	else:
		x += s[i]
x = x.split()
res = ''
for i in x:
	if i[0] == 'a':
		res += 'a'
		continue
	if i[0] == 'y':
		res += 'y'
		continue
	if i[0] == 'i':
		res += 'i'
		continue
	if i[0] == 'u':
		res += 'u'
		continue
	if i[0] == 'e':
		if len(i) != 2:
			res += 'e'
		else:
			res += 'ee'
		continue
	if i[0] == 'o':
		if len(i) != 2:
			res += 'o'
		else:
			res += 'oo'
		continue
	res += i
print(res)


n = int(input())
s = input()
_s = []
_s.append(s[0])
s = '#' + s + '####'
for i in range(2, n + 1):
	if s[i] != 'a' and s[i] != 'e' and (s[i] != 'o') and (s[i] != 'u') and (s[i] != 'i') and (s[i] != 'y'):
		_s.append(s[i])
	elif s[i] != s[i - 1]:
		_s.append(s[i])
	elif s[i - 1] == s[i] and s[i - 1] != s[i - 2] and (s[i] != s[i + 1]) and (s[i] == 'e' or s[i] == 'o'):
		_s.append(s[i])
for i in range(0, len(_s)):
	print(_s[i], end='')


n = input()
s = input()
i = 0
t = ''
while i < int(n):
	if i == 0 or s[i] != s[i - 1] or (s[i] != 'a' and s[i] != 'e' and (s[i] != 'i') and (s[i] != 'o') and (s[i] != 'u') and (s[i] != 'y')) or (s[i] == s[i - 1] and ((s[i] == 'e' or s[i] == 'o') and (i < 2 or s[i - 2] != s[i]) and (i + 1 == int(n) or s[i + 1] != s[i]))):
		t += s[i]
	i = i + 1
print(t)


n = int(input())
s = input()
ar = []
gl = ['a', 'e', 'i', 'o', 'u', 'y']
i = 0
while i < len(s):
	it = False
	if s[i] in gl:
		it = True
	if it:
		cnt = 0
		c = s[i]
		j = i
		while j < len(s) and s[j] == s[i]:
			cnt += 1
			j += 1
		if (s[i] == 'e' or s[i] == 'o') and j - i == 2:
			ar.append(s[i])
			ar.append(s[i])
		else:
			ar.append(s[i])
		i = j
	else:
		ar.append(s[i])
		i += 1
print(''.join(ar))


n = int(input())
s = input() + '0'
i = 0
a = 'aeiouy'
b = 'oe'
ans = []
while i < n:
	ans.append(s[i])
	if s[i] in a:
		if s[i] in b and s[i + 1] == s[i] and (s[i + 2] != s[i]):
			ans.append(s[i])
			i += 2
		else:
			x = i
			while s[i] == s[x]:
				i += 1
	else:
		i += 1
print(''.join(ans))


import re
n = input()
line = input()
line = re.sub('eee+', 'e', line)
line = re.sub('ooo+', 'o', line)
line = re.sub('aa+', 'a', line)
line = re.sub('ii+', 'i', line)
line = re.sub('uu+', 'u', line)
line = re.sub('yy+', 'y', line)
print(line)


n = int(input())
a = {'a', 'o', 'e', 'u', 'i', 'y'}
s = input()
curVolve = 'a'
curCount = 0
ans = []
i = 0
flag = 0
curRepeat = 'e'
while i < n:
	if s[i] in a:
		curVolve = s[i]
		if curVolve == 'e' or curVolve == 'o':
			if flag == 2:
				if curRepeat == curVolve:
					ans.pop()
					while i < n and s[i] == curVolve:
						i += 1
					i -= 1
					flag = 0
				else:
					flag = 1
					curRepeat = curVolve
					ans.append(s[i])
			elif flag == 0:
				curRepeat = curVolve
				flag = 1
				ans.append(s[i])
			elif curRepeat == curVolve:
				ans.append(s[i])
				flag = 2
			else:
				curRepeat = curVolve
				ans.append(s[i])
				flag = 1
		else:
			flag = 0
			ans.append(s[i])
			while i < n and s[i] == curVolve:
				i += 1
			i -= 1
	else:
		flag = 0
		ans.append(s[i])
	i += 1
print(''.join(ans))


n = int(input())
s = input()
a = [[s[0]]]
for i in range(1, n):
	if s[i] == s[i - 1]:
		a[-1].append(s[i])
	else:
		a.append([s[i]])
for elem in a:
	if elem[0] in 'aeiouy':
		if len(elem) == 2 and elem[0] in 'eo':
			print(elem[0] * 2, end='')
		else:
			print(elem[0], end='')
	else:
		for i in elem:
			print(i, end='')


n = int(input())
s = input()
ans = s[0]
s += '#'
cnt = 1
for i in range(1, n):
	if 'aeiouy'.count(s[i]) < 1:
		ans += s[i]
		cnt = 1
		continue
	if s[i] == s[i - 1]:
		if (s[i] == 'e' or s[i] == 'o') and cnt == 1 and (s[i + 1] != s[i]):
			ans += s[i]
		else:
			cnt += 1
		continue
	ans += s[i]
	cnt = 1
print(ans)


n = int(input())
s = [i for i in input()]
vowels = ['a', 'e', 'i', 'o', 'u', 'y']
ns = []
i = 0
while i < n:
	if s[i] in vowels:
		j = i + 1
		while j < n and s[j] == s[i]:
			j += 1
		if (s[i] == 'e' or s[i] == 'o') and j - i == 2:
			ns.append(s[i])
		ns.append(s[i])
		i = j
	else:
		ns.append(s[i])
		i += 1
print(''.join(ns))


vowel = {'a', 'e', 'i', 'o', 'u', 'y'}
n = int(input())
s = input()
l = len(s)
(ans, last_c, i) = ('', ' ', 0)
for c in s:
	if not c in vowel:
		ans += c
	elif c != last_c:
		ans += c
	elif c == 'e' or c == 'o':
		if (i + 1 >= l or s[i + 1] != c) and (i < 2 or s[i - 2] != c):
			ans += c
	last_c = c
	i += 1
print(ans)


n = int(input())
st = input()
last = '-'
ans = ''
k = 0
st += '+'
for it in st:
	if it != last:
		if last == 'a' or last == 'i' or last == 'u' or (last == 'y'):
			ans += last
		elif last == 'e' or last == 'o':
			if k == 2:
				ans += last + last
			else:
				ans += last
		elif last != '-':
			for j in range(k):
				ans += last
		last = it
		k = 1
	else:
		k += 1
print(ans)


n = int(input())
s = input()
a = ['a', 'e', 'i', 'o', 'u', 'y']
b = ['e', 'o']
s += '-'
ans = ''
c = 1
for i in range(0, len(s) - 1):
	if s[i] == s[i + 1]:
		c += 1
	else:
		if s[i] in b:
			if c == 2:
				ans += s[i] * 2
			else:
				ans += s[i]
		elif s[i] in a:
			ans += s[i]
		else:
			ans += s[i] * c
		c = 1
print(ans)


n = int(input())
s = input()
if len(s) == 1:
	print(s)
else:
	co = 0
	ce = 0
	ca = 0
	cy = 0
	cu = 0
	ci = 0
	r = ''
	s += '0'
	for i in range(0, len(s) - 1):
		p = True
		p1 = False
		if s[i] == 'o':
			p = False
			co += 1
			p = co == 1 and s[i + 1] != 'o'
			if p == False:
				p = co > 2 and s[i + 1] != 'o'
			if p == False:
				p1 = co == 2 and s[i + 1] != 'o'
		else:
			co = 0
		if s[i] == 'e':
			p = False
			ce += 1
			p = ce == 1 and s[i + 1] != 'e'
			if p == False:
				p = ce > 2 and s[i + 1] != 'e'
			if p == False:
				p1 = ce == 2 and s[i + 1] != 'e'
		else:
			ce = 0
		if s[i] == 'a':
			ca += 1
			p = ca == 1
		else:
			ca = 0
		if s[i] == 'u':
			cu += 1
			p = cu == 1
		else:
			cu = 0
		if s[i] == 'i':
			ci += 1
			p = ci == 1
		else:
			ci = 0
		if s[i] == 'y':
			cy += 1
			p = cy == 1
		else:
			cy = 0
		if p1:
			r += s[i] + s[i]
		if p:
			r += s[i]
	print(r)


import sys
n = int(input())
str = input()
str = str + '##'
i = 0
while i < n:
	if str[i] == 'e' and str[i + 1] == 'e' and (str[i + 2] != 'e') or (str[i] == 'o' and str[i + 1] == 'o' and (str[i + 2] != 'o')):
		sys.stdout.write(str[i] + str[i])
		i += 2
		continue
	if str[i] == 'e' or str[i] == 'o' or str[i] == 'i' or (str[i] == 'y') or (str[i] == 'u') or (str[i] == 'a'):
		sys.stdout.write(str[i])
		ch = str[i]
		while str[i] == ch:
			i += 1
		i -= 1
	else:
		sys.stdout.write(str[i])
	i += 1


def solve():
	n = int(input())
	arr = list(input())
	index = 0
	while index < n:
		letter = arr[index]
		if letter in ['a', 'e', 'i', 'o', 'u', 'y']:
			current = index + 1
			while current < n and arr[current] == letter:
				current += 1
			if current - index == 2 and (letter == 'e' or letter == 'o'):
				print('{}{}'.format(letter, letter), end='')
			else:
				print(letter, end='')
			index = current
		else:
			print(letter, end='')
			index += 1
	print()
solve()


a = int(input())
s = input()
ans = ''
i = 0
while i <= a - 1:
	if s[i] == 'a' or s[i] == 'i' or s[i] == 'u' or (s[i] == 'y'):
		j = i
		while j < a - 1 and s[j] == s[j + 1]:
			j += 1
		print(s[i], end='')
		i = j + 1
	elif s[i] == 'o' or s[i] == 'e':
		j = i
		while j < a - 1 and s[j] == s[j + 1]:
			j += 1
		k = 1
		if j - i == 1:
			k = 2
		print(s[i] * k, end='')
		i = j + 1
	else:
		print(s[i], end='')
		i += 1


gl = ('a', 'e', 'i', 'o', 'u', 'y')
input()
s = input()
ans = []
i = 0
while i < len(s):
	if s[i] in gl:
		now = []
		for j in s[i:]:
			if j != s[i]:
				break
			now.append(j)
		i += len(now) - 1
		ans.append(s[i])
		if len(now) == 2 and s[i] in ('o', 'e'):
			ans.append(s[i])
	else:
		ans += [s[i]]
	i += 1
print(*ans, sep='')


n = int(input(''))
a = input('')
i = 0
cur = ''
count = 0
while i < n:
	if a[i] != 'a' and a[i] != 'e' and (a[i] != 'y') and (a[i] != 'u') and (a[i] != 'o') and (a[i] != 'i'):
		print(a[i], end='')
		i = i + 1
	else:
		cur = a[i]
		count = 0
		while i < n and a[i] == cur:
			count = count + 1
			i = i + 1
		if count == 1:
			print(cur, end='')
		elif count == 2 and (cur == 'o' or cur == 'e'):
			print(cur, end='')
			print(cur, end='')
		else:
			print(cur, end='')


def isg(a):
	return a == 'a' or a == 'e' or a == 'i' or (a == 'o') or (a == 'u') or (a == 'y')
n = int(input())
s = input()
curr = ''
k = 1
for i in range(n):
	if isg(s[i]):
		if s[i] == curr:
			k += 1
		else:
			if curr != 'o' and curr != 'e' or k != 2:
				print(curr, end='')
			else:
				print(curr + curr, end='')
			k = 1
			curr = s[i]
	else:
		if curr != 'o' and curr != 'e' or k != 2:
			print(curr, end='')
		else:
			print(curr + curr, end='')
		curr = ''
		k = 1
		print(s[i], end='')
if curr != 'o' and curr != 'e' or k != 2:
	print(curr, end='')
else:
	print(curr + curr, end='')


n = int(input())
s = input()
a = ''
t = 'aeiouy'
for i in range(n):
	if t.find(s[i]) < 0:
		a = a + s[i]
	elif i > 0 and s[i] != s[i - 1] or i == 0:
		a = a + s[i]
	elif i > 0 and s[i] == 'e' and (i < n - 1 and s[i + 1] != s[i] or i == n - 1) and (i > 1 and s[i - 2] != s[i] or i <= 1):
		a = a + s[i]
	elif i > 0 and s[i] == 'o' and (i < n - 1 and s[i + 1] != s[i] or i == n - 1) and (i > 1 and s[i - 2] != s[i] or i <= 1):
		a = a + s[i]
print(a)


(n, s) = (int(input()), list(input()))
for i in range(n - 1):
	if s[i] in 'aeiouy':
		j = i
		while j < n and s[j] == s[i]:
			j += 1
		k = j - i
		if k > 2 or (k == 2 and s[i] in 'aiuy'):
			s[i + 1:j] = [''] * (k - 1)
print(''.join(s))


n = int(input())
s = input()
m = {}
m['a'] = 1
m['e'] = 2
m['i'] = 1
m['o'] = 2
m['u'] = 1
m['y'] = 1
(i, ans) = (0, '')
while i < n:
	c = s[i]
	i += 1
	(flag, cou) = (0, 1)
	if m.get(c, 0) == 2:
		flag = 1
	while i < n and s[i] == c and (m.get(c, 0) == 1 or m.get(c, 0) == 2):
		cou += 1
		i += 1
	if flag == 0 or cou != 2:
		ans += c
	else:
		ans += c * 2
print(ans)


n = int(input())
s = input()
c = '&'
ans = ''
i = 0
while i < n:
	j = i
	while j + 1 < n and s[j + 1] == s[i]:
		j += 1
	if i == j - 1 and (s[i] == 'e' or s[i] == 'o'):
		ans += s[i]
		ans += s[i + 1]
	elif s[i] == 'e' or s[i] == 'a' or s[i] == 'i' or (s[i] == 'o') or (s[i] == 'u') or (s[i] == 'y'):
		ans += s[i]
	else:
		k = i
		while k <= j:
			ans += s[k]
			k += 1
	i = j + 1
print(ans)


import re
input()
print(re.sub('a+|i+|u+|y+|eee+|ooo+', lambda m: m.group()[0], input()))