This page is still under construction.

Parts of this page are still being built. What you see may change.

String analysis

Time limit1sMemory limit256 MB

Summary
Count the lowercase letters, uppercase letters, digits, and spaces in each input line until end of input.
Level

Easy1 of 10

Topics
String, Implementation
Solved
No attempts yet

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. (1≤N≤1001 \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.

Examples7

  1. Example 1

    Input
    This is String
    SPACE    1    SPACE
     S a M p L e I n P u T     
    0L1A2S3T4L5I6N7E8
    
    Expected output
    10 2 0 2
    0 10 1 8
    5 6 0 16
    0 8 9 0
    
  2. Example 2

    Input
    abcdefghijklmnopqrstuvwxyz
    
    Expected output
    26 0 0 0
    
  3. Example 3

    Input
    a
    
    Expected output
    1 0 0 0
    
  4. Example 4

    Input
    0123456789
    
    Expected output
    0 0 10 0
    
  5. Example 5

    Input
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    z
    
    Expected output
    0 100 0 0
    1 0 0 0
    
  6. Example 6

    Input
                                                                                                        
    z
    
    Expected output
    0 0 0 100
    1 0 0 0
    
  7. Example 7

    Input
     a B c D 1 2 e F
    
    Expected output
    3 3 2 8