>>934
map<string,unsigned int>words;
while(cin >> x){
words[x]++;
}
for(map<string,unsigned int>::const_iterator i = words.begin(); i != words.end(); ++i){
cout << i->first << "は" << i->second << "回" << endl;
}