#include<bits/stdc++.h>
using namespace std;
int main(){
	string s;
	cin>>s;
	// write your code here......
	int arr[3]{};
	for (const auto &item: s) {
		arr[item-'a']++;
	}
	for (const auto &item: arr) {
		cout<<item<<' ';
	}
	return 0;
}