#include using namespace std; int main(){ string S; cin >> S; int y = 0,e = 0,a = 0,h= 0,excrimation = 0; for(int b = 0; b < S.size(); b++){ if(S.at(b) == 'Y') y++; else if(S.at(b) == 'E') e++; else if(S.at(b) == 'A') a++; else if(S.at(b) == 'H') h++; else if(S.at(b) == '!') excrimation++; } cout << y << " " << e << " " << a <<" " << h << " " << excrimation << endl; }