#include<bits/stdc++.h>
using namespace std;
char a[111];
int c=0,d=0,e=0; 
int main(){
    gets(a);
    for(int i=0;i<=strlen(a);i++){
        if(a[i]<='z'&&a[i]>='a'){
            c++;
        }
        else if(a[i]<='Z'&&a[i]>='A'){
            d++;
        }
        else if(a[i]<='9'&&a[i]>='0'){
            e++;
        }
    }
    cout<<d<<" "<<c<<" "<<e;
    return 0;
}

/**************************************************************
	Problem: 1097
	User: chenlingxuan
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/