12535 - So beautiful   

Description

Into the unknown~ ~ ~ ~

~ by anonymous queen

As a programmer, you know that into the unknown will cause your program fatal error. Although you despise the unknown behavior, you still like this song. You decide to study how lyric work.


Give you n words. Each word contains at least one vowel( 'a', 'e', 'i', 'o', 'u' ) and only contains lower case character.

Every four words can compose a lyric in two lines form.

Each line only contains two words and separated by a single blank.

A lyric is good if and only if:

  1. the first line's first word contains as many vowels as the second line's first word

  2. the first line's second word contains as many vowels as the second line's second word.

  3. the last vowel of first line's second word is same as the last vowel of second line's second word

EXAMPLE:

about proud

hooray round

This example is a good lyric.

Because "about" has 3 vowels so is "hooray",

"proud" has 2 vowels so is "round"

and the last vowel of "proud" is "u" so is "round".

Your task is finding how many good lyric can be composed from the n words.

Make the answer as big as possible.

Note: Each word can be only used for one time!

 

 

Download the C++ reference.
You will see the file named "12534.cpp" but that's OK.
Just download the file and change the filename extension(副檔名) into "zip" then you can upzip the file and use the reference.
The link is below.

reference.zip

Input

The first line contains only one integer n(1 <= n <= 100000)

The following n lines each lines contain only one string.

Each string's length will not exceed 200.

Output

Print the largest number of lyric that you can compose from n words.

Remember to print \n at the end of output.

 

Sample I/O explain:

14

wow

this

is

the

first

mcdics

codeforces

round

hooray

i

am

proud

about

that

You can compose at most three lyric:

about proud

hooray round

 

wow first

this is

 

i that

mcdics am

 

Sample Input  Download

Sample Output  Download

Tags




Discuss