# -----------------------------------------------------------------------------------------
# Oak Valley Coding Club 2019-2020
# Solution for 2020 ACSL Programming Problem #2 – Junior Division
# Author :  Pahan Dewasurendra
# Language: Python 3.x
# -----------------------------------------------------------------------------------------


def words(file):
  words = []
  with open(file) as f:
    lines = f.readlines()
    for line in lines:
      words.append(line.split())
  return words

input=words('input.txt')

def e(a,b):
  a,b=list(a),list(b)
  v=['A','E','I','O','U']
  x,y=[a[0]],[b[0]]
  for i in range (1,len(a)):
    if (a[i-1]!=a[i]) or (a[i] in v):
      x.append(a[i])
  for i in range (1,len(b)):
    if (b[i-1]!=b[i]) or (b[i] in v):
      y.append(b[i])
  a,b=x,y
  # print(a,b)
  x,y=[a[0]],[b[0]]
  for i in a[1:]:
    if i not in v:
      x.append(i)
  for i in b[1:]:
    if i not in v:
      y.append(i)
  a,b=x,y
  x,y=[],[]
  for i in range (0,max(len(a),len(b))):
    if ilen(b):
    return ''.join(b)
  if len(a)==len(b):
    l=[a,b]
    l.sort()
    return ''.join(l[0])


output=''
for i in input:
  output+=(e(i[0],i[1]) + '\n')

with open('output.txt', 'w') as f:
  f.write(output)