s = input().strip() counts = [ s.count('Y'), s.count('E'), s.count('A'), s.count('H'), s.count('!') ] print(' '.join(map(str, counts)))