#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    cin>>s;
    // write your code here......
    int cnt_a = 0;
    int cnt_b = 0;
    int cnt_c = 0;
    for (int i = 0; i <= s.length();i++){
        if (s[i] == 'a'){
            cnt_a++;
        }
        if (s[i] == 'b'){
            cnt_b++;
        }
        if (s[i] == 'c'){
            cnt_c++;
        }
    }
    cout << cnt_a << ' ' << cnt_b << ' ' << cnt_c << endl;
    return 0;
}