while True: try: s=input() alphas,digits,blanks,others=0,0,0,0 for i in s: if i.isdigit(): digits+=1 elif i.isalpha(): alphas+=1 elif i == ' ': blanks+=1 else: others+=1 print(alphas,blanks,digits,others,sep='\n') except: break