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()
l = len(s)
a = s[0]
b = s[l-1]
c = str(l-2)
print("a"+c+"b")
s = input()
l = len(s)
a = s[0]
b = s[l-1]
c = str(l-2)
print(a+c+b)