#K37982. Word Frequency Counter

    ID: 26097 Type: Default 1000ms 256MiB

Word Frequency Counter

Word Frequency Counter

Given an input string with words separated by spaces, your task is to compute the frequency of each word in a case-insensitive manner. The output should be a JSON object string where each key is a word (in lowercase) and its value is the number of times it appears in the input. The keys in the output must be in lexicographical order.

For example, if the input is:

Hello world hello

Then the output should be:

{"hello":2,"world":1}

inputFormat

The input consists of a single line containing a string. The string will have words separated by spaces and no punctuation.

outputFormat

Print a JSON object string which maps each lowercase word to its frequency count. The keys must be sorted in lexicographical order and printed without any extra spaces.

## sample
Hello
{"hello":1}