Given an array of distinct strings words, return the minimal possible abbreviations for every word.
The following are the rules for a string abbreviation:
Begin with the first character, and then the number of characters abbreviated, followed by the last character.
If there is any conflict and more than one word shares the same abbreviation, a longer prefix is used instead of only the first character until making the map from word to abbreviation become unique. In other words, a final abbreviation cannot map to more than one original word.
If the abbreviation does not make the word shorter, then keep it as the original.