#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
int main(){
set<string> st;
map<string,int> mp;
string tmp;
vector<string> v;
bool flag = true;
while(flag && cin>>tmp){
if(tmp[tmp.size()-1] == '.'){
tmp = tmp.substr(0,tmp.size()-1);
// cout<<tmp<<"------------"<<endl;
flag = false;
}
if(tmp[0] >= 'A' && tmp[0] <= 'Z')
tmp[0] = tmp[0] + 32;
// cout<<tmp;
v.push_back(tmp);
st.insert(tmp);
}
for(set<string>::iterator it = st.begin(); it != st.end(); it++){
for(int i = 0; i < v.size(); i++){
if(*it == v[i])
mp[*it]++;
}
}
for(map<string,int>::iterator it = mp.begin(); it != mp.end(); it++){
cout<<it->first<<":"<<it->second<<endl;
}
}