#include using namespace std; namespace { char S[ 100009 ]; } int main( int argc, char *argv[] ) { int i; int iY; int iE; int iA; int iH; int iM; char C; // 文字列を取得 cin >> S; // 文字数をカウント i = 0; iY = 0; iE = 0; iA = 0; iH = 0; iM = 0; C = S[ i ]; while( C != '\0' ) { i++; if( C == 'Y' ) iY++; else if( C == 'E' ) iE++; else if( C == 'A' ) iA++; else if( C == 'H' ) iH++; else if( C == '!' ) iM++; // 次の文字 C = S[ i ]; } // 出力 cout << iY << " " << iE << " " << iA << " " << iH << " " << iM << endl; return 0; }