s = input().strip()
print(s.count('Y'), s.count('E'), s.count('A'), s.count('H'), s.count('!'))