S = input() y = S.count("Y") e = S.count("E") a = S.count("A") h = S.count("H") b = S.count("!") print(y,e,a,h,b)