#输入字符串
str1=[x for x in input()]
letter,blank,digit,others=0,0,0,0

for x in str1:
    if x.isalpha():#检测字符是否是字母
        letter+=1
    elif x.isspace():#检测字符是否是空格
        blank+=1
    elif x.isdigit():#检测字符是否是数字
        digit+=1
    else:
        others+=1
print(letter)
print(blank)
print(digit)
print(others)