#include<cstdio> #include<cstring> #include<map> #include<set> usingnamespacestd; int n = 19; int w[20][20]; int fencity[(1 << 18)];
voidsolve(){ int xn = (1 << (n - 1)); for (int x = 0; x < xn; x++) {
fencity[x] = 0; for (int i = 0; i < n; i++) for (int j = i + 1; j < n; j++){ int p = (x & (1 << i)); int q = (x & (1 << j)); if (p == 0 && q > 0 || p > 0 && q == 0){ fencity[x] += w[i][j]; } } } }
char s[1000010]; char voewls[] = "aeiouwy"; intmain(){ #ifndef LOCAL freopen("consonant.in", "r", stdin); freopen("consonant.out", "w", stdout); #endif scanf("%s", s); int len = strlen(s); set<char> S(voewls, voewls+ 7); map<char, int> M; int cnt = 0; for (char ch = 'b'; ch <= 'z'; ch++) { if (!S.count(ch)) M[ch] = cnt++; }
for (int i = 0; i < len - 1; i++) { if (M.count(s[i]) && M.count(s[i + 1])) { w[M[s[i]]][M[s[i + 1]]]++; w[M[s[i + 1]]][M[s[i]]]++; } } solve(); int ans = 0, xn = (1 << (n - 1)); for (int x = 1; x < xn; x++) if (fencity[ans] < fencity[x]) ans = x;
for (int i = 0; i < len; i++) { if (!S.count(s[i]) && ((ans & (1 << M[s[i]])) > 0)) printf("%c", s[i] + 'A' - 'a'); elseprintf("%c", s[i]); } printf("\n");