for i in range(5):
    user_input = input('Enter the strings: ')

    doub_output = ''
    for i in range(1,len(user_input)-1):
        if user_input[i] == user_input[i + 1]:
            print()
            #print(i, user_input[i], ' is removed')
        else:
            doub_output += user_input[i]
            #print(i, my_str[i], doub_output)
    if user_input[0] != user_input[1]:
        doub_output = user_input[0] + doub_output

    if [-1] != user_input[-2]:
        doub_output = doub_output + user_input[-1]

    #print(doub_output)

    vowels = 'AEIOU'
    my_str = ''
    for i in range(len(doub_output)):
        #print(i,doub_output[i], my_str)
        if i == 0:
            my_str += doub_output[i]
        else:
            if doub_output[i] in vowels:
                continue
            else:
                my_str += doub_output[i]
        #print(my_str)


    input_list = my_str.split(' ')
    length = min(len(input_list[0]), len(input_list[1]))
    str1 = ''
    str2 = ''
    for i in range(length):
        #print(input_list[0][i], input_list[1][i])
        if input_list[0][i] == input_list[1][i]:
            print()
            #print(i, f'The letter {input_list[0][i]} matches and is skipped')
            continue
        else:
            str1 += input_list[0][i]
            str2 += input_list[1][i]
        #print(i, str1, str2)
    my_lrlist = [str1 + input_list[0][length:], str2 + input_list[1][length:]]

    def convert(i):
        return(' '.join(i))
    my_lr = convert(my_lrlist)
    #print(my_lr)


    input_list2 = my_lr.split(' ')
    length = min(len(input_list2[0]), len(input_list2[1]))
    str1 = ''
    str2 = ''
    for i in range(1,length+1):
        print()
        #print(-i, input_list2[0][-i], input_list2[1][-i])
        if input_list2[0][-i] == input_list2[1][-i]:
            print()
            #print(-i, f'The letter {input_list2[0][-i]} matches and is skipped')
            continue
        else:
            str1 += input_list2[0][-i]
            str2 += input_list2[1][-i]
        #print(-i, str1, str2)
    str1 = str1[::-1]
    str2 = str2[::-1]
    #print(input_list2[0][0:len(input_list2[0]) - length] + str1 , input_list2[1][0:len(input_list2[1]) - length] + str2)

    my_lst = [input_list2[0][0:len(input_list2[0]) - length] + str1 , input_list2[1][0:len(input_list2[1]) - length] + str2]

    if len(my_lst[0]) == len(my_lst[1]):
        my_lst.sort()
        print(my_lst[0])
    else:
        length = 100000
        for i in my_lst:
            if len(i) < length:
                length = len(i)
            #print(i, length)
        my_output = []
        for i in my_lst:
            if len(i) == length:
                my_output.append(i)
        print(convert(my_output))