#K63617. Word Length Dictionary
Word Length Dictionary
Word Length Dictionary
You are given a list of words. Your task is to produce a dictionary (or map) where each key is a word converted to lowercase, and its corresponding value is the length of that word. In other words, duplicate words (ignoring case) should appear only once, and the order of keys in the output should be the order in which they first appear in the input.
For example, given the input words:
Hello world Python
The output should be:
{"hello": 5, "world": 5, "python": 6}
The goal is to implement this functionality while reading input from standard input (stdin) and printing the result to standard output (stdout).
The mathematical notation for the length of a word w can be represented as: \( length(w) \).
inputFormat
The first line of input contains an integer \( n \) representing the number of words.
The second line contains \( n \) words separated by spaces.
outputFormat
Output a dictionary in the format: {"word1": length, "word2": length, ...} where each word is in lowercase and appears only once, in the order of their first appearance.
## sample3
Hello world Python
{"hello": 5, "world": 5, "python": 6}