#include <iostream>
#include <cstring>
using namespace std;
// Funcție pentru a verifica numărul de vocale dintr-un cuvânt
int numarVocale(const char* cuvant) {
int count = 0;
const char* vocale = "aeiouAEIOU"; // Vocalele mari și mici
while (*cuvant) {
if (strchr(vocale, *cuvant)) {
count++;
}
cuvant++;
}
return count;
}
int main() {
int k;
cin >> k; // Citim numărul k
cin.ignore(); // Ignorăm newline-ul rămas după citirea lui k
char text[260]; // Declarați un buffer pentru text
while (cin.getline(text, 260)) { // Citim textul linie cu linie
char* cuvant = strtok(text, " ,.!?;:\n"); // Împărțim textul în cuvinte
while (cuvant != nullptr) {
if (numarVocale(cuvant) >= k) { // Verificăm dacă cuvântul are cel puțin k vocale
cout << cuvant << endl; // Afișăm cuvântul
}
cuvant = strtok(nullptr, " ,.!?;:\n"); // Continuăm să citim următorul cuvânt
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCi8vIEZ1bmPIm2llIHBlbnRydSBhIHZlcmlmaWNhIG51bcSDcnVsIGRlIHZvY2FsZSBkaW50ci11biBjdXbDom50CmludCBudW1hclZvY2FsZShjb25zdCBjaGFyKiBjdXZhbnQpIHsKICAgIGludCBjb3VudCA9IDA7CiAgICBjb25zdCBjaGFyKiB2b2NhbGUgPSAiYWVpb3VBRUlPVSI7IC8vIFZvY2FsZWxlIG1hcmkgyJlpIG1pY2kKICAgIHdoaWxlICgqY3V2YW50KSB7CiAgICAgICAgaWYgKHN0cmNocih2b2NhbGUsICpjdXZhbnQpKSB7CiAgICAgICAgICAgIGNvdW50Kys7CiAgICAgICAgfQogICAgICAgIGN1dmFudCsrOwogICAgfQogICAgcmV0dXJuIGNvdW50Owp9CgppbnQgbWFpbigpIHsKICAgIGludCBrOwogICAgY2luID4+IGs7IC8vIENpdGltIG51bcSDcnVsIGsKICAgIGNpbi5pZ25vcmUoKTsgLy8gSWdub3LEg20gbmV3bGluZS11bCByxINtYXMgZHVwxIMgY2l0aXJlYSBsdWkgawoKICAgIGNoYXIgdGV4dFsyNjBdOyAvLyBEZWNsYXJhyJtpIHVuIGJ1ZmZlciBwZW50cnUgdGV4dAogICAgd2hpbGUgKGNpbi5nZXRsaW5lKHRleHQsIDI2MCkpIHsgLy8gQ2l0aW0gdGV4dHVsIGxpbmllIGN1IGxpbmllCiAgICAgICAgY2hhciogY3V2YW50ID0gc3RydG9rKHRleHQsICIgLC4hPzs6XG4iKTsgLy8gw45tcMSDcsibaW0gdGV4dHVsIMOubiBjdXZpbnRlCiAgICAgICAgd2hpbGUgKGN1dmFudCAhPSBudWxscHRyKSB7CiAgICAgICAgICAgIGlmIChudW1hclZvY2FsZShjdXZhbnQpID49IGspIHsgLy8gVmVyaWZpY8SDbSBkYWPEgyBjdXbDom50dWwgYXJlIGNlbCBwdcibaW4gayB2b2NhbGUKICAgICAgICAgICAgICAgIGNvdXQgPDwgY3V2YW50IDw8IGVuZGw7IC8vIEFmaciZxINtIGN1dsOibnR1bAogICAgICAgICAgICB9CiAgICAgICAgICAgIGN1dmFudCA9IHN0cnRvayhudWxscHRyLCAiICwuIT87OlxuIik7IC8vIENvbnRpbnXEg20gc8SDIGNpdGltIHVybcSDdG9ydWwgY3V2w6JudAogICAgICAgIH0KICAgIH0KCiAgICByZXR1cm4gMDsKfQo=