String analysis

No attempts yetTime limit1sMemory limit256 MB

Problem

You are given NN strings. Write a program that counts the lowercase letters, the uppercase letters, the digits, and the spaces in each string.

Every string consists only of lowercase letters, uppercase letters, digits, and spaces.

Input

From the first line to the NN-th line, one string is given per line. (1N1001 \le N \le 100) No string is longer than 100 characters.

NN is not given separately, so read until the input ends. A string can also begin or end with spaces.

Output

For each string, print on one line the number of lowercase letters, uppercase letters, digits, and spaces, separated by single spaces. Keep the order in which the strings are given.