#include<bits/stdc++.h>
using namespace std;
int main() {
    string s;
    cin >> s;
    // write your code here......
    int num_a(0), num_b(0), num_c(0);
    for (int i = 0; i < s.size(); i++) {
        switch (s[i]) {
            case 'a':
                num_a++;
                break;
            case 'b':
                num_b++;
                break;
            case 'c':
                num_c++;
                break;
        }
    }
    cout << num_a << " " << num_b << " " << num_c << endl;
    return 0;
}