program ABC_069_A_i18n
   implicit none
   integer l
   character(100) s
   read(*, *) s
   l = len_trim(s)
   if(l-2 <= 9) then
       write(*, '(a1,i1,a1)') s(1:1), l-2, s(l:l)
   else
       write(*, '(a1,i2,a1)') s(1:1), l-2, s(l:l)
   end if
end program ABC_069_A_i18n