Untitled

mail@pastecode.io avatar
unknown
python
a year ago
173 B
1
Indexable
Never
def abreviater(word):
    if len(word) > 10:
        word = f"{word[0]}{len(word)-2}{word[-1]}"
    return word

for i in range(int(input())):
    print(abreviater(input()))