P6263 [COCI 2014/2015 #3] STROJOPIS

Description

Correct typing is becoming an important part of culture. If you still do not use all ten fingers to type, you must relearn typing—then you will type faster and feel more comfortable and happy. Many websites teach you how to type correctly. The picture below shows the basic idea: keys that should be pressed by the same finger have the same color. Yellow keys should be pressed by the little finger, blue keys by the ring finger, green keys by the middle finger, and red keys by the index finger. Naturally, the left hand presses the left side of the keyboard (the keys to the left starting from `5`, `T`, `G`, `B`), and the right hand presses the right side (the keys to the right starting from `6`, `Y`, `H`, `N`). The thumb is responsible for the space bar. ![](https://cdn.luogu.com.cn/upload/image_hosting/qhsm2dkz.png) Your task is to output, for each finger (except the thumb), how many times it must be pressed to correctly type the given string.

Input Format

Only one line containing a string $s$. The string contains no spaces and contains only the characters shown in the picture above.

Output Format

The output must consist of eight lines, each containing one integer, which represents the number of key presses for each finger observed **from left to right** (excluding the thumb).

Explanation/Hint

#### Constraints Let $|s|$ denote the length of the input string. For $100\%$ of the testdata, $1\le |s|\le 50$. Translated by ChatGPT 5