# 20241011
s = input()
e = 0
p = 0
n = 0
ot = 0
for i in s:
    if i.isalpha():
        e += 1
    elif i.isspace():
        p += 1
    elif i.isdigit():
        n += 1
    else:
        ot += 1
print(e)
print(p)
print(n)
print(ot)