#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    cin>>s;
    // 输出'a','b','c'出现次数
    int na = 0, nb =0, nc = 0;
    for (int i = 0; i < s.length(); i++){  //s.size()也可以
        if (s[i] == 'a')
            na++;
        if (s[i] == 'b')
            nb++;
        if (s[i] == 'c')
            nc++;
    }
    cout << na << " " << nb << " " << nc;
    return 0;
}