#include<bits/stdc++.h>
using namespace std;
int main(){
int a=0,b=0,c=0;
string s;
getline(cin,a);
for(int i=0;i<s.size();i++){
if(s[i]>='0'&&s[i]<='9') c++;
else if(s[i]>='A'&&s[i]<='Z') b++;
else if(s[i]>='a'&&s[i]<='z') a++;
}
cout<<b<<" "<<a<<" "<<c;
}
/**************************************************************
Problem: 1097
User: wangyiyang
Language: C++
Result: Compile Error
****************************************************************/