#C12736. Character Frequency Count

    ID: 42196 Type: Default 1000ms 256MiB

Character Frequency Count

Character Frequency Count

You are given a string and need to compute the frequency of each character in the string. The counting is case-sensitive, meaning 'A' and 'a' are treated as different characters. You should output a dictionary-like structure that maps each character to its frequency, preserving the order of first occurrence.

For example, if the input is:

HelloWorld

The correct output is:

{'H': 1, 'e': 1, 'l': 3, 'o': 2, 'W': 1, 'r': 1, 'd': 1}

If the input string is empty, output an empty dictionary: {}.

All input will be provided via stdin and the output should be printed to stdout.

inputFormat

The input consists of a single line containing the string whose character frequency is to be calculated.

outputFormat

Print the frequency dictionary in the format specified in the example. The dictionary should follow the format of Python's built-in dictionary literal, with keys in the order of their first appearance.## sample

HelloWorld
{'H': 1, 'e': 1, 'l': 3, 'o': 2, 'W': 1, 'r': 1, 'd': 1}