#include<stdio.h>
#include<string.h>
#include<conio.h>
struct candidate{
char name[20];
int count;
};
int main(void)
{
struct candidate person[3]={"Li",0,"Zhang",0,"Sun",0};
int all;
char name[20];
scanf("%d",&all);
for (int i = 0; i < all; i++)
{
scanf("%s",name);
for (int b = 0; b < 3; b++)
{
if (person[b].name==name)
{
person[b].count++;
}
}
}
for (int g = 0; g < 3; g++)
{
printf("%s:%d\n",person[g].name,person[g].count);
}
return 0;
}