/* ex_7_3.c++ */

#include <iostream>
#include <string>
#include <map>
using namespace std;

typedef map<string, int> string_int_map;

int main(void) {
	string_int_map m;
	
	string texte;
	cout << "Tapez du texte (ou rien pour quitter) :" << endl;
	while (1) {
		cin >> texte;
		if (texte==".") break;
		m[texte]++;
	}

	string_int_map::iterator it;

	m.erase("linux");

	it = m.find("est");
	if (it != m.end()) 
		cout << "On vu le mot " << it->first << " " << it->second << " fois." << endl;

	for (it = m.begin(); it != m.end(); it++) {
		cout << it->first << " : " << it->second << " fois." << endl;
	}

	return 0;
} 