import sys
s = input()

alpha = 0
space = 0
digit = 0
others = 0
for i in s:
    if i.isalpha():
        alpha += 1
    elif i.isspace():
        space += 1
    elif i.isdigit():
        digit += 1
    else:
        others += 1
print(alpha)
print(space)
print(digit)
print(others)