#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <map>
#include <string>

using namespace std;

int main() {
	string s;
	cin >> s;
	map<char, int> mp;
	for (char c : s) {
		mp[c]++;
	}
	printf("%d %d %d %d %d\n", mp['Y'], mp['E'], mp['A'], mp['H'], mp['!']);
}