while True: try: a = input() eng_sum = 0 space_sum = 0 digit_sum = 0 symbol_sum = 0 for x in a: if x.isalpha(): eng_sum += 1 elif x.isspace(): space_sum += 1 elif x.isdigit(): digit_sum += 1 else: symbol_sum += 1 print(eng_sum) print(space_sum) print(digit_sum) print(symbol_sum) except: break