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):
a = input()
print(a[0]+str(len(a)-2)+a[-1])

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

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

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + 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()
length=len(s)-2
print(s[0]+str(length)+s[-1])

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

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

Solution (Python):

s = list(input())
ans = []
ans.append(s[0])
ans.append(str((len(s)-2)))
ans.append(s[-1])

print("".join(ans))

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

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):
list_S = input()
num = len(list_S)-2
num = str(num)
f = list_S[0]
l = list_S[-1]
ans = [f, num, l]
print("".join(ans))

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[:1] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()

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

Solution (Python):
s = str(input())
num = len(s)
numS = str(num - 2)
print(s[0] + numS + 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[-1],sep="")

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

Solution (Python):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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()

char_number = len(s)

start = s[0]
end   = s[-1]

answer = start + str(char_number - 2) + end
print(answer)

Solution (Python):
s=input()

n=len(s)

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

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

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

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

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

Solution (Python):

url = "https://atcoder.jp//contests/abc069/tasks/abc069_b"

def main():
    st = input()
    ans = st[0] + str(len(st[1:-1])) + st[-1]
    print(ans)


if __name__ == '__main__':
    main()

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):
N = list(input())
print(N[0] + str(len(N)-2) + N[-1])

Solution (Python):
s = input()
print(s[0] + '{}'.format(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 = 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()
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()

I = S[0]
B = S[len(S)-1]

figure = str(len(S)-2)

print(I + figure + B)

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

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()
ans = s[0] + str(len(s) - 2) + s[-1]
print(ans)

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

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

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

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()
len_s = str(len(s)-2)
print(s[0]+len_s+s[-1])

Solution (Python):
s = input()

n = len(s) - 2

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

Solution (Python):
a=input()

f=a[0]
l=a[-1]
le=len(a)-2

print(f+str(le)+l)

Solution (Python):
import io
import math

sam = input()
print(sam[0]+str(len(sam)-2)+sam[-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[-1]
print(ans)

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

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

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

i_i = lambda: int(i_s())
i_l = lambda: list(map(int, stdin.readline().split()))
i_s = lambda: stdin.readline().rstrip()

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

Solution (Python):





inputstr = input()
length = len(inputstr) - 2
print('{}{}{}'.format(inputstr[0],length,inputstr[-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 = 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 = input()

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

print(ans)

Solution (Python):
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    S = list(iss())
    print(S[0] + str(len(S)-2) + S[-1])


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):




"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""








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

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 = input()
n=len(s)
print(s[0]+str(n-2)+s[-1])

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

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

Solution (Python):


s = input()

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

Solution (Python):

import math
import itertools
import statistics

import collections



s = input()
print(s[0]+str(len(s)-2)+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=list(input())
top=s[0]
tail=s[-1]
num=str(len(s)-2)
print(top+num+tail)

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

Solution (Python):
x=list(str(input()))

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

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

Solution (Python):
s = str(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):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

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

Solution (Python):
s = input()
n = len(s)-2
print(s[0] + str(n) + 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):
import sys
input = sys.stdin.readline
S = list(input())[: -1]
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)
n-=2
print(s[0]+str(n)+s[-1])

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

Solution (Python):
def resolve():

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

resolve()

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
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 STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]

s = STR()
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):
def main():
    S = input()
    print(S[0]+str(len(S)-2)+S[-1])


if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin
def main():
    readline=stdin.readline
    S=readline().strip()
    print(S[0]+str(len(S)-2)+S[-1])
if __name__=="__main__":
    main()

Solution (Python):

dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]

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()
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()

size = len(s[1:-1])

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

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

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

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[1:-1]))+s[-1])

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

M = []

M.append(N[0])
M.append(str(len(N) - 2))
M.append(N[-1])

date = ''.join(M)
print(date)

Solution (Python):
s=input()

ans=[]

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

print(*ans,sep="")

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[len(S)-1])

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

Solution (Python):
import math

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):
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 = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
S = input()
N = str(len(S)-2)
print(S[0]+N+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=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)

Solution (Python):












mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

def main():
    s = input()
    l = len(s) - 2
    ans = [s[0],str(l),s[-1]]
    print(''.join(ans))
    return

if __name__=='__main__':
    main()

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):
s = list(input())

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

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

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

Solution (Python):
x,*y,z=input()
print(x+str(len(y))+z)

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

print(a[0]+str(b)+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[len(s) - 1])

Solution (Python):
string = input()
string_length = len(string)
print(string[0] + "%d" % (string_length - 2) + string[string_length - 1])

Solution (Python):
n = input()
m = len(n)
print('{}{}{}'.format(n[0],m-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):
s=input()

ans = []

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

print(''.join(map(str,ans)))

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 = list(input())

num = len(s[1:len(s)-2]) + 1

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()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = 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):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

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

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

Solution (Python):

s=input()

ini=s[0]
fin=s[-1]
len=str(len(s)-2)

print (ini+len+fin)

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)-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()
print(s[0] + str(len(s) - 2) + s[-1])

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

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

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

Solution (Python):

import sys


def solve(s: str):
    print("%s%d%s" % (s[0], len(s) - 2, s[-1]))


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] + str(len(s)-2) + s[-1])

Solution (Python):
S = input()

f = S[0]
e = S[-1]
length = str(len(S)-2)

print(f+length+e)

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

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

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

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

Solution (Python):
import sys

word = input()

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

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

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

Solution (Python):
s=input()
a=len(s)-2
print(str(s[0])+str(a)+str(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 = str(input())
print(s[0] + str(len(s) - 2) + 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):
a = str(input())

s = len(a)

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

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

Solution (Python):


def main():
     s = input()
     l = len(s)

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

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):








def resolve():

    s=str(input())

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

resolve()

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()
a = s[1:]
a = a[:-1]
l = [s[0],str(len(a)),s[-1]]
ans = ''.join(l)
print(ans)

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

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

Solution (Python):
S = input()
print(S[0]+str(len(S[0:-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=str(input())
print(S[0]+str(len(S)-2)+S[len(S)-1])

Solution (Python):
s=input()
moji=[a for a in s]
saisho=moji[0]
saigo=moji[-1]
del moji[0]
del moji[-1]
number=len(moji)
print(saisho+str(number)+saigo)

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

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

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

Solution (Python):

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

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

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

Solution (Python):
s=list(input())
a=0
a=len(s)-2
l=[]
l.append(s[0])
l.append(str(a))
l.append(s[-1])

print("".join(l))

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

Solution (Python):
import sys
s = sys.stdin.readline().strip()
print("{}{}{}".format(s[0], len(s) - 2, s[-1]))

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

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

Solution (Python):
s = input()
num=str(len(s)-2)
print(s[0]+num+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()
N = len(s)
print(s[0] + str(N - 2) + s[N - 1])

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

Solution (Python):


def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    s=input()
    ans=[s[0],str(len(s)-2),s[-1]]
    print(''.join(map(str, ans)))

main()

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

Solution (Python):
S = input()
s = len(S[1:-1])
print("{}{}{}".format(S[0], s, 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):
a = input()
b = len(a)
print(a[0]+str(b-2)+a[b-1])

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

Solution (Python):
s = list(input())
l = s.pop(0)
r = s.pop()
print(l, len(s), r, sep="")

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

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

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

Solution (Python):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    a, *b, c = sys.stdin.readline().rstrip()
    print(a, len(b), c, sep="")


if __name__ == '__main__':
    main()

Solution (Python):


s = input()

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

Solution (Python):
a = input()
print(a[0]+str(len(a)-2)+a[-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 = 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[len(s)-1])

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

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

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

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)-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()
n = len(s)

print(s[0] + str(n-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()
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 = 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()
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:1] + str(len(s) - 2) + s[len(s) - 1:len(s)])

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

Solution (Python):
s = input()

d = len(s[1:len(s)-1])

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

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

Solution (Python):

h,*b,t = input()
print(h+str(len(b))+t)

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

Solution (Python):
text = input()

top = text[0]
bottom = text[-1]
result = top + str(len(text) - 2) + bottom
print(result)

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

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


if __name__ == '__main__':
    main()

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

num = len(s) -2
f_char = s[0]
l_char = s[-1]

ans = str(f_char) + str(num) +str(l_char)

print(ans)

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):
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[len(s)-1])

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

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

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+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)+'{}'.format(s[len(s)-1]))

Solution (Python):
S=input()
N=len(S[1:-1])
print(S[0],end="")
print(N,end="")
print(S[-1])

Solution (Python):
s = input()

a,*b,c = s

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

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

Solution (Python):



s = input().strip()

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

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

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

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

Solution (Python):
s = input()

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

Solution (Python):
s = input()
n = str(len(s[1:-1]))
print(s[0] + n + 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()

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

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

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

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

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

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

Solution (Python):
def i18n(s):

    count = (len(s) - 2)

    return str(s[0]) + str(count) + str(s[-1])

def main():
    s = str(input())
    print(i18n(s))

if __name__ == '__main__':
    main()

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):
l = list(input())
print("{}{}{}".format(l[0],len(l)-2,l[-1]))

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

main()

Solution (Python):
s = input()

n = len(s)

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

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

Solution (Python):
s = input()

r = s[:1] +str(len(s)-2) + s[-1:]

print(r)

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

Solution (Python):
a = input()
print(a[0]+(str)(len(a)-2)+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[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):
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):
lst = list(input())
print("{}".format(lst[0]+str(len(lst)-2)+lst[-1]))

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

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

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

Solution (Python):


import math


def main():
    S = list(input())
    print(S[0] + str(len(S[1:-1])) + S[-1])


if __name__ == "__main__":
    main()

Solution (Python):


words = input()
print("{}{}{}".format(words[0],str(len(words[1:-1])),words[-1]))

Solution (Python):
s = input()
count = 0
for i in range(len(s)):
    if i==0:
        continue
    if i==(len(s)-1):
        continue
    count += 1
ans = s[0]
ans = ans + str(count)
ans = ans + s[len(s)-1]
print(ans)

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

Solution (Python):
n=input()
print(n[0]+str(len(n)-2)+n[-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=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[1:-1]))+s[-1])

Solution (Python):
s = input()

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

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

x = len(s) -2

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

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

x = len(s) -2

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

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

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

Solution (Python):
s=str(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],len(s)-2,s[-1],sep='')

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

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+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):
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()

l = len(s) - 2

print(s[:1] + str(l) + s[-1:])

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

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

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

Solution (Python):
import math
import calendar
import fractions
import itertools

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

Solution (Python):
"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys
import itertools



read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = readline().decode('utf8').rstrip()
ans=S[0]+str(len(S[1:len(S)-1]))+S[-1]

print(ans)

Solution (Python):
import sys
s = sys.stdin.readline().rstrip()
l = len(s[1:len(s)-1])
print(s[0]+str(l)+s[-1])

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

Solution (Python):
s = input()

print('%s%d%s' % (s[0], 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)

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

Solution (Python):
import math

def intinput():
    return int(input())

def listintinput():
    return list(map(int,input().split()))

def splitintinput():
    return map(int,input().split())

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

Solution (Python):
import math

def intinput():
    return int(input())

def listintinput():
    return list(map(int,input().split()))

def splitintinput():
    return map(int,input().split())

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(s[0]+str(len(s)-2)+ s[-1])

Solution (Python):
s = input()
a = str(len(s)-2)

print(s[0], end='')
print(a, end='')
print(s[len(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,*b,c = input()
print(a+str(len(b))+c)