您的位置:首页 > 其它

【ECJTU_ACM 11级队员2012年暑假训练赛(7) - K - String Task】

2012-08-05 23:55 459 查看
K - String Task
Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u
Submit Status Practice CodeForces 118A

Description

Petya started to attend programming lessons. On the first lesson his task was to write a simple program. The program was supposed to do the following: in the given string, consisting if uppercase and lowercase Latin letters, it:

deletes all the vowels,

inserts a character "." before each consonant,

replaces all uppercase consonants with corresponding lowercase ones.

Vowels are letters "A", "O", "Y", "E", "U", "I", and the rest are consonants. The program's input is exactly one string, it should return the output as a single string, resulting after the program's processing the initial string.

Help Petya cope with this easy task.

Input

The first line represents input string of Petya's program. This string only consists of uppercase and lowercase Latin letters and its length is from 1 to 100, inclusive.

Output

Print the resulting string. It is guaranteed that this string is not empty.

Sample Input

Input
tour


Output
.t.r


Input
Codeforces


Output
.c.d.f.r.c.s


Input
aBAcAba


Output
.b.c.b


#include <iostream>
using namespace std;

char iMap[12] = {'A', 'a', 'Y', 'y', 'E', 'e', 'U', 'u', 'O', 'o', 'I', 'i'};

bool iInMap(char c)
{
bool yes = false;
int flag = 11;
while (!yes && flag >= 0)
{
if (iMap[flag] == c)
{
yes = true;
}
flag--;
}
return yes;
}

int main()
{
string s;
while (cin >> s)
{
for (int i = 0; i < (int)s.length(); i++)
{
if (!iInMap(s[i]))
{
if (s[i] >= 'A' && s[i] <= 'Z')
{
s[i] += 32;
}
cout << "." << s[i];
}
}
cout << endl;
}
return 0;
}

// end
// ism
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: