The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.  You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
s=input()
count=0
for i in range(len(s)):
    if i == 0 or i == len(s)-1:
        continue
    else:  
        count=count+1

print(count)
r=s[0] + "" + str(count) + "" + s[len(s)-1]

print(r)
s=input()
count=0
for i in range(len(s)):
    if i == 0 or i == len(s)-1:
        continue
    else:  
        count=count+1
r=s[0] + "" + str(count) + "" + s[len(s)-1]

print(r)