#include <iostream>
#include <map>
using namespace std;
void f(char &c){
if(c>='A'&&c<='Z')
c+=32;
}
bool is(char &c){
return (c>='a'&&c<='z')||(c>='A'&&c<='Z');
}
int main() {
string str;
getline(cin,str);
map<string, int>m;
for(int i=0;i<str.size();++i){
f(str[i]);
int j=i+1;
for(;j<str.size()&&is(str[j]);++j){
f(str[j]);
}
++m[string(&str[i],&str[j])];
i=j;
}
for(auto it:m)cout<<it.first<<":"<<it.second<<endl;
}
// 64 位输出请用 printf("%lld")
拿下

京公网安备 11010502036488号