Word Abbreviation
An abbreviation of a word keeps a prefix, replaces the removed middle with its length, and keeps the last character. For a word of length L and a kept prefix of length k with 1 <= k < L, the form is:
word[0..k-1] + (L - k - 1) + word[L-1]
For example international (length 13) with k = 1 becomes i11l.
For every word in words, return its shortest abbreviation that is not equal to the abbreviation of any other word in the list. Because the abbreviation is built from the same word, two words can produce the same abbreviation only when they have the same length, the same last character, and the same kept prefix.
If no abbreviation is strictly shorter than the word itself, keep the word unchanged. Length 1, 2, and 3 words can never be shortened. Duplicate words keep their full spelling because each duplicates the other's abbreviation.
Return the results in the same order as the input list.
Word Abbreviation
An abbreviation of a word keeps a prefix, replaces the removed middle with its length, and keeps the last character. For a word of length `L` and a kept prefix of length `k` with `1 <= k < L`, the form is: