/* 26.7.2000 - This program does not do anything useful.
 *             Ignore this source file. // Bisqwit
 */
#include <map>
#include <string>
#include <iostream>

using namespace std;

static class tagi
{
private:
	string tagname;
public:
	tagi()
	{
	}
	tagi operator() (const string &s, unsigned &a, const unsigned b)
    {
    	tagi tmp;
    	
    	string w;
    	++a;
    	if(a < b && s[a] == '/') w += s[a++];
    	while(a < b)
    	{
    		if(w == "!--")
    		{
    			while(a < b)
    			{
    				if(s.substr(a, 3)=="-->")
    				{
    					a += 3;
    					break;
    				}
    				++a;
    			}
    			return tmp;
    		}
    		unsigned char c = s[a];
    		if(c >= 'A' && c <= 'Z') { w += c;         ++a; continue; }
    		if(c >= 'a' && c <= 'z') { w += c+'A'-'a'; ++a; continue; }
    		break;
    	}
    	while(a < b)
    	{
    		unsigned char c = s[a];
    		if(c == '>')
    		{
    			++a;
    			break;
    		}
    		if(c == '"')
    		{
    			++a;
    			while(a < b)
    			{
    				c = s[a];
    				if(c == '"')break;
    				++a;
    			}
    		}
    		++a;
    	}
    	return w;
    }
} tagi;

static void sana(const string &s, unsigned &a, const unsigned b)
{
	string w;
	while(a < b)
	{
		unsigned char c = s[a];
		if((c >= 'A' && c <= 'Z')
		|| (c >= 'a' && c <= 'z')
		|| (c >= '0' && c <= '9')
		|| (c >= 160 && c <= 250))
		{
		ok: w += c;
			a++;
			continue;
		}
		if(c == '&')
		{
			string esc;
			while(++a < b)
			{
				c = s[a];
				if(c == ';')break;
				esc += c;
			}
			esc += ' '; // to prevent overflow at esc[0]
			bool uml   = (esc.substr(1) == "uml ");
			bool ring  = (esc.substr(1) == "ring ");
			bool acute = (esc.substr(1) == "acute ");
			bool grave = (esc.substr(1) == "grave ");
			c = ' ';
			switch(esc[0])
			{
				case 'a': c = " äáàå"[uml+acute*2+grave*3+ring*4]; if(c!=' ')break;
				case 'e': c = " ëéè "[uml+acute*2+grave*3+ring*4]; if(c!=' ')break;
				case 'i': c = " ïíì "[uml+acute*2+grave*3+ring*4]; if(c!=' ')break;
				case 'o': c = " öóò "[uml+acute*2+grave*3+ring*4]; if(c!=' ')break;
				case 'u': c = " üúù "[uml+acute*2+grave*3+ring*4]; if(c!=' ')break;
				case 'y': c = " ÿýy "[uml+acute*2+grave*3+ring*4]; if(c!=' ')break;
				case 'A': c = " ÄÁÁÅ"[uml+acute*2+grave*3+ring*4]; if(c!=' ')break;
				case 'E': c = " ËÉÈ "[uml+acute*2+grave*3+ring*4]; if(c!=' ')break;
				case 'I': c = " ÏÍÌ "[uml+acute*2+grave*3+ring*4]; if(c!=' ')break;
				case 'O': c = " ÖÓÒ "[uml+acute*2+grave*3+ring*4]; if(c!=' ')break;
				case 'U': c = " ÜÚÙ "[uml+acute*2+grave*3+ring*4]; if(c!=' ')break;
				case 'Y': c = " YÝY "[uml+acute*2+grave*3+ring*4]; if(c!=' ')break;
			}
			if(c != ' ')goto ok;
			++a; // skip ';'
		}
		// At this point, char was illegal.
		if(!w.size())++a;
		break;
	}
	// At this point, word has been found, and a points to next char after it (or after &esc; if found).
	if(w.size() && (w[0]<'0' || w[0]>'9'))
		++sanat[w];
}
static void parse(const string &s)
{
    unsigned a=0, b=s.size();
    while(a < b)
    {
        char c = s[a];
        if(c == '<')
        {
        	tagi(s,a,b);
        //	cout << "TAG: " << tagi(s,a,b) << endl;
        }
        else
        {
        	if(c==' ' || c=='\n' || c=='\t' || c=='\r')
        	{
        		++a;
        		continue;
        	}
        	sana(s,a,b);
        }
    }
}
int main()
{
	cerr << "Usage: cat *.html | htmlparser1 | sort -rn | head -n 100\n";
    string s;
    while(cin.good()) { string t; getline(cin, t); s += t; s += '\n'; }
    parse(s);
    for(stype::iterator i=sanat.begin(); i!=sanat.end(); ++i)
    	cout << i->second << ':' << i->first << endl;
    return 0;
}
