#include<iostream>
#include<map>
#include<string>
#include<set>
using namespace std;
int main() {
map<string, size_t> word_count;
string word;
set<string> key_word{"the","a"};
while (cin >> word) {
if (key_word.find(word) == key_word.cend()) {
//word[0] = tolower(word[0]); //此处用于忽略大小写
word.front() = tolower(word.front()); //注意此处的赋值操作不可忽略
if (ispunct(word.back())) //此处用于处理末尾的符号
word.pop_back();
word_count[word]++;
}
}
for (auto it = word_count.cbegin(); it != word_count.cend(); it++)
cout << it->first << " occurs " << it->second << " times" << endl;
return 0;
}