#include<iostream>
#include<string>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int len,i=2;
cin >> len;
string s;
cin >> s;
cout << s[0];
if (len > 1)
cout << s[1];
while (i<len-1)
{
if (s[i + 1] == 'a' || s[i + 1] == 'e' || s[i + 1] == 'u' || s[i + 1] == 'i' || s[i + 1] == 'o')
{
cout << '.' << s[i] << s[i + 1];
i += 2;
}
else
{
cout << s[i] ;
i ++;
}
}
if (s[len - 1] != 'a' && s[len - 1] != 'e' && s[len - 1] != 'u' && s[len - 1] != 'i' && s[len - 1] != 'o')
cout << s[len - 1];
cout << endl;
}
return 0;
}
D - Unnatural Language Processing(Codeforces)
最新推荐文章于 2024-11-07 23:24:07 发布