Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- for i in range(n):
- s = input()
- if len(s) > 10:
- print(s[0] + str(len(s) - 2) + s[-1])
- else:
- print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement