#include using namespace std; namespace { char S[ 100100 ]; int i; int iY; int iE; int iA; int iH; int i_; } int main() { int i; char C; cin >> S; i = 0; while( ( C = S[ i ] ) != '\0' ) { if( C == 'Y' ) iY++; else if( C == 'E' ) iE++; else if( C == 'A' ) iA++; else if( C == 'H' ) iH++; else if( C == '!' ) i_++; i++; } cout << iY << " " << iE << " " << iA << " " << iH << " " << i_ << endl; return 0; }