#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
// write your code here......
int m=s.size(),count1=0,count2=0,count3=0;
for(int i=0;i<m;i++){
if(s[i]=='a'){
count1++;
}
if(s[i]=='b'){
count2++;
}
if(s[i]=='c'){
count3++;
}
}
cout<<count1<<" "<<count2<<" "<<count3;
return 0;
}