We’re preparing your current view and syncing the latest data.
You are given n words. For each word, if its length is more than 10, you should replace it with an abbreviation. The abbreviation has the following form: the first letter, the number of letters between the first and the last letter, and the last letter. For example, "localization" will be abbreviated as "l10n" and "internationalization" will be abbreviated as "i18n". If a word has length 10 or less, output it unchanged.
The first line contains an integer n (1 ≤ n ≤ 100). Each of the following n lines contains a single word. Each word consists of only lowercase English letters and has length between 1 and 100.
For each word, print its abbreviation or the original word according to the rule specified above.
1 ≤ n ≤ 100; 1 ≤ length of each word ≤ 100.