#include <fstream>
#include <string>
using namespace std;
int main()
{
fstream out("wynik5.txt", ios::app);
fstream in("slowa.txt", ios::in);
out << "1\n";
int ilosc[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
string slowo;
for(int i = 0; i < 1000; i++) {
in >> slowo;
ilosc[slowo.size()-1]++;
}
for(int i = 0; i < 12; i++)
out << i+1 << ' ' << ilosc[i] << '\n';
}