#include <iostream>
using namespace std;
int main()
{
char x[100];
int n, litere=0, litereMari=0, litereMici=0;
cin>>n>>x;
for(int i=0; i<n; i++) {
if(x[i]>='a' && x[i]<='z') {
litereMici++;
litere++;
}
if(x[i]>='A' && x[i]<='Z') {
litereMari++;
litere++;
}
}
cout<<"Litere: "<<litere<<endl;
cout<<"Litere mari: "<<litereMari<<endl;
cout<<"Litere mici: "<<litereMici<<endl;
return 0;
}