LearnPy Hub
← Arena
EasyRating 800

Abbreviate Long Words

Words longer than 10 letters are abbreviated as first letter + number of letters in between + last letter (localization → l10n). Shorter words stay. Read n words.

Input

n, then n words.

Output

n lines.

Sample 1

Input
4
word
localization
internationalization
pneumonoultramicroscopicsilicovolcanoconiosis
Output
word
l10n
i18n
p43s

Sample 2

Input
1
abcdefghij
Output
abcdefghij
solution.py
Output appears here
Abbreviate Long Words · Python Arena problem · LearnPy Hub