import string
user_input = input()
lower,upper,number,space,other = 0,0,0,0,0
for i in user_input:
if i in string.ascii_lowercase:
lower+=1
elif i in string.ascii_uppercase:
upper+=1
elif i in string.digits:
number+=1
elif i in " ":
space+=1
elif i in string.punctuation:
other+=1
print(lower,upper,number,space,other)