#include<iostream>
using namespace std;
int main()
{
string st;
//getline(cin, st);
cin>>st;//cin读取字符串遇到空格会停止
int numal=0,num=0,numoth=0;
for(auto s:st)
{
if(s >= 'A' && s <= 'Z' || s >= 'a' && s <= 'z') numal++;
else if(s>='0'&&s<='9') num++;
else numoth++;
}
cout<<numal<<' '<<num<<' '<<numoth<<endl;
return 0;
}