#include <cctype>
#include <iostream>
#include <vector>
#include <algorithm>
#include<map>
using namespace std;
int main() {
vector<string> v;
string str;
while (cin >> str) {
//将获取的字符串变成小写
for(char & i : str)
{
i = tolower(i);
}
//获取到以句号结尾,就退出循环
if (str[str.size() - 1] == '.') {
str.pop_back();
v.push_back(str);
break;
}
v.push_back(str);
}
map<string, int> m;
for (auto it : v) {
m[it]++;//m默认int的初始化为0
}
for(auto it:m)
{
cout<<it.first<<":"<<it.second<<endl;
}
}
// 64 位输出请用 printf("%lld")

京公网安备 11010502036488号