P12517 "MSTOI-R1" MST Find
Description
You are given a string. Count how many times `M`, `S`, and `T` appear in the string.
It is case-insensitive.
The length of the input string is guaranteed to be $n \le 10^5$.
Input Format
Input one string in a single line, guaranteed to contain only uppercase letters, lowercase letters, and spaces.
Note: **Spaces are also part of the string.**
Output Format
Output three natural numbers in one line, separated by spaces, representing the counts of `M`, `S`, and `T` in the string.
Explanation/Hint
Assume the length of the input string is $n$. Then $1 \le n \le 10^5$. It is guaranteed to contain only uppercase letters, lowercase letters, and spaces.
Translated by ChatGPT 5