#include <iostream>
#include <cstring>
#define SIZE 1001
using namespace std;
int countWords(char* speech)
{
int wordCount = 0;
char delim[] = " ,.!?:;-\"\'";
char* pointer = strtok(speech, delim);
while (pointer != NULL)
{
pointer = strtok(NULL, delim);
wordCount++;
}
return wordCount;
}
int countSyllables(char* speech)
{
int syllableCount = 0;
char vowels[] = "aoeuAOEU";
char* pointer = strpbrk(speech, vowels);
while (pointer != NULL)
{
pointer = strpbrk(pointer + 1, vowels);
syllableCount++;
}
return syllableCount;
}
int main()
{
int n;
cin >> n;
char speech[SIZE];
int words[n];
int syllables[n];
cin.ignore();
for (int i = 0; i < n; i++)
{
cin.getline(speech, SIZE);
syllables[i] = countSyllables(speech);
words[i] = countWords(speech);
}
bool many = false;
int winner = 0;
for (int i = 1; i < n; i++)
{
if (syllables[i] * words[winner] < syllables[winner] * words[i])
{
winner = i;
many = false;
}
else if (syllables[i] * words[winner] == syllables[winner] * words[i])
{
if (words[winner] < words[i])
{
winner = i;
many = false;
}
else if (words[winner] == words[i])
many = true;
}
}
if (many)
cout << "O-o-o-rks...";
else
cout << winner + 1 << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KI2RlZmluZSBTSVpFIDEwMDEKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBjb3VudFdvcmRzKGNoYXIqIHNwZWVjaCkKewoJaW50IHdvcmRDb3VudCA9IDA7CgljaGFyIGRlbGltW10gPSAiICwuIT86Oy1cIlwnIjsKCWNoYXIqIHBvaW50ZXIgPSBzdHJ0b2soc3BlZWNoLCBkZWxpbSk7Cgl3aGlsZSAocG9pbnRlciAhPSBOVUxMKQoJewoJCXBvaW50ZXIgPSBzdHJ0b2soTlVMTCwgZGVsaW0pOwoJCXdvcmRDb3VudCsrOwoJfQoJcmV0dXJuIHdvcmRDb3VudDsJCn0KCmludCBjb3VudFN5bGxhYmxlcyhjaGFyKiBzcGVlY2gpCnsKCWludCBzeWxsYWJsZ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