# B - 文字数カウント
# https://atcoder.jp/contests/abc028/tasks/abc028_b

S = input()
A = S.count('A')
B = S.count('B')
C = S.count('C')
D = S.count('D')
E = S.count('E')
F = S.count('F')
print(A,B,C,D,E,F)
