#C7860. Character Frequency Counter

    ID: 51778 Type: Default 1000ms 256MiB

Character Frequency Counter

Character Frequency Counter

You are given a string s. Count the number of occurrences of each character in the string and output each unique character along with its count in the order of their first appearance. The answer should be formatted such that each line contains a character, followed by a colon, a space, and its count.

In mathematical terms, given an input string \( s \), if a character \( c \) appears \( f(c) \) times, then output the result as:

\[ c: f(c) \]

for each unique character c in the order of their first occurrence.

inputFormat

The input is a single line string read from standard input (stdin). The string may contain alphabetical characters and other symbols.

outputFormat

The output should be printed to standard output (stdout). For each unique character in the string (in order of appearance), print a line in the format "character: count". Do not print any extra spaces or blank lines.

## sample
programming
p: 1

r: 2 o: 1 g: 2 a: 1 m: 2 i: 1 n: 1

</p>