Problem:
 Score : 200 points    Problem Statement 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.      Constraints  3 ≤ |s| ≤ 100 ( |s| denotes the length of s .)  s consists of lowercase English letters.         Input Input is given from Standard Input in the following format:  s       Output Print the abbreviation of s .        Sample Input 1 internationalization      Sample Output 1 i18n       Sample Input 2 smiles      Sample Output 2 s4s       Sample Input 3 xyz      Sample Output 3 x1z

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    s = str(input().rstrip('\n'))
    print(s[0] + str(len(s)-2) + s[-1])


if __name__ == '__main__':
    slove()

Solution (Python):
s=str(input())
n=str(len(s)-2)
print(s[0]+str(n)+s[-1])

Solution (Python):
s = input()
len=len(s)

li=[]

li.append(s[0])
li.append(str(len-2))
li.append(s[len-1])

ss="".join(li)
print(ss)

Solution (Python):
s=str(input())
n=str(len(s)-2)
t=s[0]+str(n)+s[-1]
print(t)

Solution (Python):
S = input()
print(S[0] + str(len(S[1:-1])) + S[-1])

Solution (Python):
i=input()
print(i[0]+str(len(i)-2)+i[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
s=input();print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()

print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
s = list(input())
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = list(input())
print(s[0] +str(len(s)-2) +s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
S = input()
print(S[0] + str(len(S)-2) + S[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):

s = input()
print(s[0] + str((len(s)-2)) + s[len(s)-1])

Solution (Python):
import sys
input = sys.stdin.readline

s = list(input().strip())

c = len(s)

a, b = s[0], s[c-1]

d = [ a , c - 2 , b]

d = map(str,d)

d = ''.join(d)

print(d)

Solution (Python):
s = input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
s = input()
n = len(s)-2
print(s[0]+str(n)+s[-1])

Solution (Python):
S = input()
print(S[0] + str(len(S) - 2) + S[-1])

Solution (Python):
s = input()
ans = s[0] + str(len(s) - 2) + s[-1]
print(ans)

Solution (Python):
s = list(input())
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
i = input()

print(i[0] + str(len(i[1:-1])) + i[-1])

Solution (Python):
s = input()
cnt = 0
for i in s:
    cnt += 1

print(s[0] + str(cnt - 2) + s[cnt - 1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:len(s)-1])) + s[len(s)-1])

Solution (Python):
s = input()
print('{}{}{}'.format(s[0], len(s)-2, s[-1]))

Solution (Python):
S=input()
print(S[0]+str(len(S)-2)+S[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input().rstrip()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
aida = str(len(s)-2)
print(s[0] + aida + s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
def resolve():
    s = input()
    print(s[0] + str(len(s) - 2) + s[-1])


if __name__ == "__main__":
    resolve()

Solution (Python):
S = input()
print(S[0] + str(len(S[1:-1])) + S[-1])

Solution (Python):
S = input()
print(S[0]+str(len(S)-2)+S[len(S)-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
n = len(s[1:-1])
print(s[0] + str(n) + s[-1])

Solution (Python):
s = input()

A = s[0]
B = s[-1]
C = len(s)-2
print(A+str(C)+B)

Solution (Python):
s = input()
print( s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
s = input()

print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()
count = len(s) - 2
print(s[:1] + str(count) + s[len(s) - 1:])

Solution (Python):
s=list(input())
ans=s[0]
ans+=str(len(s)-2)
ans+=s[-1]
print(ans)

Solution (Python):
def solve():
    s = input()
    replaced_length = len(s) - 2
    print(s[0] + str(replaced_length) + s[-1])

solve()

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) +s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:len(s)-1])) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[len(s)-1])

Solution (Python):
s=input();print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[:1] + str(len(s[1:-1])) + s[-1:])

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
s = input()

print(s[0] + str(len(s) -2) + s[-1])

Solution (Python):
a=input()
b = int(len(a))-2
print("{}{}{}".format(a[0],b,a[int(len(a))-1]))

Solution (Python):
s = input()
first = s[0]
last = s[len(s) - 1]
count = 0
for i in range(len(s)):
    count += 1
print(first + str(count - 2) + last)

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
s = input()

omitted = s[0] + str(len(s) - 2) + s[-1]
print(omitted)

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
S = list(input())

print(S[0]+str(len(S)-2)+S[-1], sep='')

Solution (Python):
s=input()

print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0], len(s)-2, s[len(s)-1], sep='')

Solution (Python):
S=input()
print(S[0]+str(len(S)-2)+S[-1])

Solution (Python):
string = input()
print(string[0] + str(len(string)-2) + string[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=list(input())
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
s=list(input())
n=len(s)
ans=[0,0,0]
ans[0]=s[0]
ans[1]=str(n-2)
ans[2]=s[n-1]
print(''.join(ans))

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
n = input()

print(n[0],len(n)-2,n[-1],sep='')

Solution (Python):
s = input()
print(s[0], len(s) - 2, s[-1], sep="")

Solution (Python):
S=input()
h=S[0]
t=S[-1]
mid=str(len(S)-2)
print(h+mid+t)

Solution (Python):
s = input()
print(s[0] + str(len(s) -2) + s[-1])

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    s = input().strip()

    print(s[0]+str(len(s[1:-1])) + s[-1])


if __name__ == "__main__":
    main()

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
a, *b, c = input()
print(a+str(len(b))+c)

Solution (Python):
S = input()
print(S[0] + str(len(S)-2) + S[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
a = input()
n = len(a)
print(a[0], n-2, a[n-1], sep = "")

Solution (Python):
n=input()
first = n[0]
last = n[-1]
num = len(n) -2
print(first + str(num) + last)

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
s=input()
l=len(s)

print(s[0]+str(l-2)+s[l-1])

Solution (Python):

s = input()
ans = s[0] + str(len(s[1:-1])) + s[-1]
print(ans)

Solution (Python):

s = input()
ans = s[0]
ans += str(len(s[1:-1])) + s[-1]
print(ans)

Solution (Python):
S = input()

print(S[0] + str(len(S[1: -1])) + S[-1])

Solution (Python):
s = input()

ans = s[0] + str(len(s[1:-1])) + s[-1]

print(ans)

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print('{}{}{}'.format(s[0], len(s)-2, s[-1]))

Solution (Python):
s=input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = list(input())

ans = s[0] + str(len(s)-2) + s[-1]
print(ans)

Solution (Python):
s=input()
cnt=str(len(s)-2)
print(s[0]+cnt+s[-1])

Solution (Python):
s = list(map(str, input()))
print('{}{}{}'.format(s[0], len(s)-2, s[-1]))

Solution (Python):
import sys
import copy
import  math
import bisect
from collections import *
from operator import itemgetter
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

s = input()
l = len(s)
print(s[0] + str(l - 2) + s[-1])

Solution (Python):
S = input().strip()
print('{}{}{}'.format(S[0],len(S)-2,S[-1]))

Solution (Python):
s = input()
print(s[:1] + str(len(s)-2) + s[-1:])

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

s = input()[:-1]

print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
print(s[:1]+str(len(s)-2)+s[(len(s)-1):])

Solution (Python):
s = input()
print( s[0] + str(len(s)-2) + s[-1] )

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
string = input()
num = len(string)
print(string[0] + str(num - 2) + string[num -1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
s = input()
l= len(s)-2
x=s[0]
y=s[-1]
print(x+str(l)+y)

Solution (Python):
S = list(input())
print(S[0]+str(len(S)-2)+S.pop())

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()

length = len(s)-2

print(s[0]+str(length)+s[-1])

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
S=input();print(S[0]+str(len(S)-2)+S[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
S = input()
print(S[0]+str(len(S)-2)+S[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()

print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
S = input()
print(S[0] + str(len(S)-2) + S[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()
print('{}{}{}'.format(s[0],
                      len(s[1:-1]),
                      s[-1]))

Solution (Python):
s = input()
print(s[0] + str((len(s) - 2)) + s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
s = input()
cnt = 0
for i in range(1,len(s)-1):
    cnt += 1
print(s[0]+str(cnt)+s[len(s)-1])

Solution (Python):
s = input()
print(str(s[0]) + str(len(s)-2) + str(s[len(s)-1]))

Solution (Python):
s = input()
l = len(s)
print(s[0]+str(l-2)+s[l-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0] + str((len(s) - 2)) + s[- 1])

Solution (Python):
a = list(input())
print(a[0]+str(len(a)-2)+a[len(a)-1])

Solution (Python):
def main():
    s = input()
    return s[0] + str(len(s)-2) + s[-1] 
if __name__ == '__main__':
    print(main())

Solution (Python):
s = input()
s_arr = list(s)
print(s_arr[0]+str(len(s)-2)+s_arr[len(s)-1])

Solution (Python):
s=input()
n=len(s)-2
print(s[0]+str(n)+s[-1])

Solution (Python):
s = input()
a = (s[0] + str(len(s) - 2) + s[len(s)-1])
print(a)

Solution (Python):
S = input()

N = len(S)

a = S[0]
b = S[-1]

print(a+str(N-2)+b)

Solution (Python):
a = input()
count = len(a)
print(a[0]+str(count-2)+a[count-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):


text = input()

middle_char_count = len(text) - 2

print("{}{}{}".format(text[0], str(middle_char_count), text[-1]))

Solution (Python):
s = input()

ans = s[0] + str(len(s)-2) + s[len(s)-1]

print(ans)

Solution (Python):
s = input()
print(s[0] + str(len(s)-2)+s[-1])

Solution (Python):
s = input()
l = len(s)
b = l - 2

s1 = s[0] 
s2 = s[-1]

print(s1 + str(b) + s2)

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
out = s[0] + str(len(s)-2) + s[-1]
print(out)

Solution (Python):
S = input()
print(S[0] + str(len(S)-2) + S[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
s=list(input())
print("{}{}{}".format(s[0],len(s)-2,s[-1]))

Solution (Python):
import sys
input=sys.stdin.readline

def main():

    s = input().strip()
    print(s[0] + str(len(s)-2) + s[-1])

if __name__ == '__main__':
    main()

Solution (Python):
s = input()
r = s[0] + str(len(s)-2) + s[-1]
print(r)

Solution (Python):
def resolve():
    a, *b, c = input()
    print(a, len(b), c, sep="")

if __name__ == '__main__':
    resolve()

Solution (Python):
s = input()

print(s[0], len(s)-2, s[-1], sep="")

Solution (Python):
s=input()
print(s[0]+str(len(s[1:-1]))+s[-1],sep='')

Solution (Python):
s=input()
N=len(s)-2
print(s[0]+str(N)+s[-1:])

Solution (Python):
string = input()
print(string[0] + str(len(string) - 2) + string[-1])

Solution (Python):
s=list(input())
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[:1] + str(len(s[2:len(s)])) + s[len(s) - 1:])

Solution (Python):
t=input()
a,*b,c=t
print(a+str(len(b))+c)

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
n = input()
print(n[0] + str(len(n[1:-1])) + n[-1])

Solution (Python):
n=input()
print(n[0:1]+str(len(n)-2)+n[len(n)-1:])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):


def main(s):
    print(s[0]+str(len(s)-2)+s[-1])

if __name__ == '__main__':
    s = input()
    main(s)

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
a,*b,c = input()
print(a+str(len(b))+c)

Solution (Python):
list = list(input())
print(list[0]+str(len(list)-2)+list[-1])

Solution (Python):
s=input()
ans=[s[0], str(len(s)-2), s[-1]]
print("".join(ans))

Solution (Python):
S = input()

length = len(S)

print(S[0] + str(length-2) + S[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
a,*s,b=input()
print(a+str(len(s))+b)

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
a,*b,c= input()
print(a,len(b),c,sep="")

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):


s = input()

ans = s[0] + str(len(s) - 2) + s[-1]
print(ans)

Solution (Python):
a=input()
print('{}{}{}'.format(a[0],str(len(a)-2),a[-1]))

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
a,*b,c = input()

print(a+str(len(b))+c)

Solution (Python):
a, *b, c = input()

print(a+str(len(b))+c)

Solution (Python):
l = input()
ln = len(l)-2

print(l[0],ln,l[len(l)-1],sep="")

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
s = input()
nagasa = len(s)
print(s[0]+str(nagasa-2)+s[nagasa-1])

Solution (Python):
s = input()

length = len(s)

print(s[0]+ str(length-2) +s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
a, *b, c = input()
print("{}{}{}".format(a, len(b), c))

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):

s = input()


res = s[0] + str(len(s)-2)  + s[-1]


print(res)

Solution (Python):
strings = list(input())
print(strings[0] + str(len(strings[1:-1])) + strings[-1])

Solution (Python):
import sys
from fractions import gcd
import bisect
 
stdin = sys.stdin
 
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
s = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

word = ns()
print(word[0] + str(len(word)-2) + word[-1])

Solution (Python):
s = input()
num = len(s[1:-1])
print(s[0]+str(num)+s[-1])

Solution (Python):
s = input()
n = len(s) - 2
print(s[0]+str(n)+s[-1])

Solution (Python):
a=input()
print(a[0]+str(len(a)-2)+a[-1])

Solution (Python):
text = input()
first_str = text[0]
last_str = text[-1]
num = len(text) - 2
print(first_str + str(num) + last_str)

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
a = input()
l = len(a)-2

print(a[0]+str(l)+a[-1:])

Solution (Python):
s = input()

print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()

print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()
s_f = s[0]
s_l = s[-1]

leng = str(len(s)-2)
name = s_f + leng + s_l
print(name)

Solution (Python):
N=input()
Ini=N[0]
End=N[len(N)-1]
Med=len(N)-2

LIST=[Ini,str(Med),End]
print("".join(LIST))

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
a, *b, c = input()
print(a+str(len(b))+c)

Solution (Python):
s = input()
print(str(s[0])+str(len(s)-2)+str(s[-1]))

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
ss = s[0]+str(len(s)-2)+s[-1]
print(ss)

Solution (Python):
s = input()
x = len(s) - 2
print(s[0]+str(x)+s[-1])

Solution (Python):
s = input()

a = s[0]
b = str(len(s) -2)
c = s[-1]

ans = [a,b,c]
res = "".join(ans)
print(res)

Solution (Python):
s = input()

print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()
l = [s[0], str(len(s)-2), s[-1]]
print(''.join(l))

Solution (Python):
a=input()
print(a[0]+str(len(a)-2)+a[-1])

Solution (Python):
a,*b,c = input()
print(a+str(len(b))+c)

Solution (Python):
s = input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
n = input()
print(n[0]+str(len(n)-2)+n[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
a, *b, c = input()
print(a+str(len(b))+c)

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[len(s) - 1])

Solution (Python):
N = input()
L = len(N) -2
L = str(L)
print(N[0] + L + N[-1] )

Solution (Python):
S = input()
print(S[0]+str(len(S)- 2)+S[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
n = str(len(s) -2)
ans = s[0] + n + s[-1]
print(ans)

Solution (Python):
s = list(input())
print(str(s[0])+str(len(s)-2)+str((s[-1])))

Solution (Python):
s = list(input())
num = len(s) - 2
print(s[0] + str(num) + s[len(s) - 1])

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
s = input()
s = s[0] + str(len(s)-2) + s[-1]
print(s)

Solution (Python):
s=list(input())
print(s[0],len(s)-2,s[-1],sep='')

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
a,*s,b=input()
print(a+str(len(s))+b)

Solution (Python):
a, *b, c = input()
print(a+str(len(b))+c)

Solution (Python):
s = input()
start = s[0]
mid = int(len(s)-2)
end = s[int(len(s))-1]
print('{}{}{}'.format(start, mid, end))

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = [i for i in input()]
print(s[0]+str((len(s)-2))+s[-1])

Solution (Python):
s = input()

print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
a, *b, c = input()
print(a, str(len(b)), c, sep='')

Solution (Python):
a,*b,c = input()
print(a+str(len(b))+c)

Solution (Python):
S = input()
print(S[0] + str(len(S[1:-1])) + S[-1])

Solution (Python):
word = input()
print("{0}{1}{2}".format(word[0], len(word)-2, word[-1]))

Solution (Python):
s = input()
n = len(s)
print(s[0] + str(n-2) + s[n-1])

Solution (Python):
a, *b, c = input()
print(a+str(len(b))+c)

Solution (Python):
s = input()
print(s[0], str(len(s)-2), s[-1], sep='')

Solution (Python):
S = input()
print(S[0] + str(len(S)-2) + S[-1])

Solution (Python):

s = input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
s=list(input())

s1=s[0]
s2=s[-1]

print("{0}{1}{2}".format(s1,len(s)-2,s2))

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
s = input()

slist = list(s)
print(slist[0] + str(len(s)-2) + slist[-1])

Solution (Python):
list=[s for s in input()]
med=len(list)
med2=med-2
print(list[0]+str(med2)+list[med-1])

Solution (Python):
a=input()
print(a[0]+str(len(a)-2)+a[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
a, *b, c = input()
print(a + str(len(b)) + c)

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
num=len(s)-2
print(s[0], num, s[num+1], sep="")

Solution (Python):
s = input()

s_len = len(s)

result = s[0] + str(s_len-2) + s[-1]

print(result)

Solution (Python):

s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
a,*b,c = input()
print(a,len(b),c, sep='')

Solution (Python):

import sys
INF = float("inf")


def solve(s: str):
    print(s[0]+str(len(s)-2)+s[-1])
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    s = next(tokens)  
    solve(s)


if __name__ == '__main__':
    main()

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
s = input()
print(s[0] + str((len(s)-2)) + s[-1])

Solution (Python):
s = input()
n = len(s)
print(s[0]+str(n-2)+s[-1])

Solution (Python):
a,*b,c = input()
print(a+str(len(b))+c)

Solution (Python):
List = list(input())
print(List[0]+str(len(List)-2)+List[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
a,*b,c = input()
print(a+str(len(b))+c)

Solution (Python):
s = input()

print (s[0] + str(len(s)-2) + s[-1])

Solution (Python):
a = input()
n1 = a[0]
b = len(a) - 2
n2 = a[-1]
print('{}{}{}'.format(n1,b,n2))

Solution (Python):
a, *b, c = input()

print(a+str(len(b))+c)

Solution (Python):
s = input()

print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
s = input()
print( s[0] + str(len(s)-2) + s[-1] )

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()

top = s[0]
last = s[-1]
length = len(s[0:]) - 2

print(top + str(length) + last)

Solution (Python):
S=input()
print(S[0]+str(len(S)-2)+S[-1])

Solution (Python):
i=input();print(i[0]+str(len(i)-2)+i[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[len(s)-1])

Solution (Python):
s = input()
print(s[0]+str(len(s[1:len(s)-1]))+s[-1])

Solution (Python):
string = input().rstrip("\n")
print(string[0] + str(len(string) - 2) + string[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):



s = input()


print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()
n = len(s)
print(s[0]+str(n-2)+s[n-1])

Solution (Python):
s = str(input())
n = len(s) - 2
print (s[0], end = '')
print (n, end = '')
print (s[-1])

Solution (Python):
s = input()
ans = s[0] + str(len(s)-2) + s[-1]
print(ans)

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
l = len(s)-2
print(s[0]+str(l)+s[-1])

Solution (Python):

num = input()

char = list(num)

print(char[0]+str(len(num)-2)+char[len(num)-1])

Solution (Python):
a, *b, c = input()
print(a, len(b), c, sep="")

Solution (Python):
n = input()
print("{}{}{}".format(n[0],len(n[1:-1]),n[-1]) )

Solution (Python):
text = input()
num = len(text) - 2
new_text = text[0] + str(num) + text[-1]

print(new_text)

Solution (Python):
s = str(input())

print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
x = input()

n=[]
for i in x:
  n.append(i)
p=str(len(n)-2)

print(n[0]+p+n[-1])

Solution (Python):
s=input(); print(s[0]+str(len(s)-2)+s[-1]);

Solution (Python):
s = list(str(input()))
first = s.pop(0)
last = s.pop(-1)
mid = len(s)
print("{0}{1}{2}".format(first, mid, last))

Solution (Python):
s = input()
midLen = len(s) - 2
 
print(s[0] + str(midLen) + s[-1])

Solution (Python):
s = input()

print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
a, *b, c = input()
print(a + str(len(b)) + c)

Solution (Python):
a, *b, c = input()

print(a+str(len(b))+c)

Solution (Python):
s = input()
print(s[0] + str(int(len(s)) - 2) + s[len(s)-1])

Solution (Python):
s=input()
d=s[0]+str(len(s)-2)+s[-1]
print(d)

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()

s_num = len(s)

ans = s[0] + str(s_num - 2) + s[-1]

print(ans)

Solution (Python):
a, *b, c = input()

print(a + str(len(b)) + c)

Solution (Python):
s = input()

length = len(s) - 2
print(s[0] + str(length) + s[-1])

Solution (Python):
s = list(input())
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
list = input()
print(list[0]+str(len(list)-2)+list[len(list)-1])

Solution (Python):
s = input()
l = len(s)
print(s[0]+str(l-2)+s[-1])

Solution (Python):
s=input()
l=len(s)
print(s[0],l-2,s[l-1],sep='')

Solution (Python):



if __name__ == '__main__':
    s = input()
    print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
s = str(input())
print(s[0]+str(len(s) - 2)+s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
 
s = input()
print(s[0] + str(len(s)-2) + s[len(s)-1])

Solution (Python):
str_list = list(input())

length = len(str_list)

str_shorten = str_list[0] + str(length - 2) + str_list[length - 1]

print(str_shorten)

Solution (Python):
s = input()

ans = s[0] + str(len(s) - 2) + s[-1]
print(ans)

Solution (Python):
S = input()

nLen = len(S)

nLen -= 2

a = S[0]
b = S[-1]

print('%s' %(a) + '%d' %(nLen) + '%s' %(b))

Solution (Python):
s=input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
s = input()
print(s[0] + str((len(s)-2)) + s[-1])

Solution (Python):
s = input()
print(s[0],len(s)-2,s[len(s)-1],sep="")

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = str(input())
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):

import sys, math, fractions, itertools


def solve(s: str):
    print(s[0] + str(len(s)-2) + s[-1])
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    s = next(tokens)  
    solve(s)

if __name__ == '__main__':
    main()

Solution (Python):
s=input()
print(s[0],len(s)-2,s[-1],sep="")

Solution (Python):
S = input()
ans = S[0] + str(len(S)-2) + S[-1]
print(ans)

Solution (Python):
S = input()
l = len(S)
print(S[0] + str(l-2) + S[l-1])

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math
import itertools
 




 
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    s = input()
    
    ans = s[0]
    end = s[-1]
    cnt = len(s) - 2
    
    print(ans + str(cnt) + end)
    
    
if __name__ == "__main__":
	main()

Solution (Python):
s = input()
print(s[0] + str(len(s[1:len(s)-1])) + s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
S = input()
L = len(S)

print(S[0] + str(L-2) + S[-1])

Solution (Python):
s = input()
a = s[0]
b = s[-1]
print(a + str(len(s)-2)+b)

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()

print(s[0] + str(len(s) -2 ) + s[-1] )

Solution (Python):
s=input();print(s[0]+str(len(s)-2)+s[-1]);

Solution (Python):
s = input()
ans = s[0] + str(len(s)-2) + s[len(s)-1]
print(ans)

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0], end='')
print(len(s)-2, end='')
print(s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
s = input()
lis = [s[:1],str(len(s)-2),s[-1]]
print("".join(lis))

Solution (Python):
s = str(input())
n = str(len(s) - 2)
st = s[0]
ed = s[-1]
print(st + n + ed)

Solution (Python):
s = str(input())
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s=input()
a=s[0]
b=s[-1]
m=str(len(s)-2)
print(a+m+b)

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

s = input()

print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
S = input()
N = len(S)-2

S = S[0] + str(N) + S[-1]
print(S)

Solution (Python):
a = input()
print(a[0] + str(len(a)-2) + a[len(a)-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = list(input())

print("{}{}{}".format(s[0], str(len(s)-2), s[-1]))

Solution (Python):
i = input()
print(i[0], len(i)-2 ,i[-1], sep='')

Solution (Python):
s = list(input())
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2)+s[-1])

Solution (Python):
s = list(input())
count = len(s[1:-1])
ans = s[0] + str(count) + s[-1]
print(ans)

Solution (Python):
s = input() 

s1 = s[0]
s2 = s[-1]
print(str(s1)+str(int(len(s)-2))+str(s2))

Solution (Python):
s = input()
l = len(s) - 2
print(s[0] + str(l) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()
s = list(s)
l = len(s) - 2
print(s[0] + str(l) + s[-1])

Solution (Python):
s = input()
s_list = list(s)
l = len(s_list) - 2
a = s_list[0] + str(l) + s_list[-1]
print(a)

Solution (Python):
s = input()
s_list = list(s)
l = len(s_list) - 2
a = s_list[0] + str(l) + s_list[-1]
print(a)