main(){char s[100001];gets(s);int i=0,y=0,e=0,a=0,h=0,b=0;for(i;s[i]>0;i++)s[i]==89?y++:s[i]==69?e++:s[i]==65?a++:s[i]==72?h++:b++;printf("%d %d %d %d %d",y,e,a,h,b);}