Files
NCPC/G.cpp
2026-04-17 18:28:49 +02:00

42 lines
1005 B
C++

//
// Created by zacharias on 2026-04-17.
//
#define MAX 101
#include <cstdio>
int main() {
int size = 0;
while (scanf("%d", &size) == 1) {
for (int x = 0; x < size; x++) {
char word[MAX];
char newword[MAX];
scanf("%s", word);
int i = 0;
int u = 0;
while (word[i] != '\0') {
if (word[i] == word[i+1] || (i != 0 && word[i+1] != '\0' && (word[i] == 'a' || word[i] == 'e' || word[i] == 'i' || word[i] == 'o' || word[i] == 'u'))) {
i++;
}
else {
if (word[i+1] == '\0') {
newword[u+1] = '\0';
}
newword[u] = word[i];
i++;
u++;
}
}
if (x+1 != size) {
printf("%s ", newword);
} else {
printf("%s\n", newword);
}
}
}
}