P1598 [USACO03FEB] Vertical Histogram
Description
Write a program that reads four lines of uppercase letters from the input (all uppercase, each line has at most $100$ characters), and then outputs a histogram showing how many times each character appears in the input. Format your output exactly as in the sample output.
Input Format
Four lines of characters consisting of uppercase letters, each line has at most $100$ characters.
Output Format
Consists of several lines. The first lines are made up of spaces and asterisks, and the last line is made up of spaces and letters. Do not print any unnecessary trailing spaces at the end of any line. Do not print any blank lines.
Explanation/Hint
No trailing spaces are allowed at the end of each output line.
Translated by ChatGPT 5