#include <bits/stdc++.h>
using namespace std;
int main() {
    string s;
    vector<string>v;
    map<string,int>mp;
    while (cin >> s) {
        //全部小写
        for (int i = 0; i < s.length(); i++)
            if (s[i] <= 'Z' && s[i] >= 'A')
                s[i] = (char)(s[i] + 'a' - 'A');
        v.push_back(s);
    }
    //去掉最后一个句号
    string temp =v[v.size()-1];
    v[v.size()-1] = temp.substr(0,temp.length()-1);
    for(auto a :v){
        if(mp.find(a) == mp.end())mp[a]=1;
        else mp[a]++;
    }
    for(auto a:mp)
        cout<<a.first<<":"<<a.second<<endl;
}
// 64 位输出请用 printf("%lld")