// Arup Guha
// 6/21/2023
// Solution to SIUCF CP Final Contest Problem: Beekeeper
// https://open.kattis.com/problems/beekeeper

using namespace std;
#include <bits/stdc++.h>

int count(string s);

string VOWELS = "aeiouy";

int main() {
    int n;
    cin >> n;

    // Process cases.
    while (n > 0) {

        // Assign to first one to be safe.
        string s, best;
        cin >> best;
        int most = count(best);

        // Go through each.
        for (int i=0; i<n-1; i++) {
            cin >> s;

            // If this one is better, update.
            int tmp = count(s);
            if (tmp > most) {
                most = tmp;
                best = s;
            }
        }

        // Ta da!
        cout << best << endl;

        // Get next case.
        cin >> n;
    }
    return 0;
}

// Returns the # of double vowels in s.
int count(string s) {

    int res = 0;

    for (int i=0; i<s.size()-1; i++) {

        // Skip...
        if (s[i] != s[i+1]) continue;

        // Only 1 can match, so this works.
        for (int j=0; j<VOWELS.size(); j++)
            if (s[i] == VOWELS[j])
                res++;
    }

    return res;
}
