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



Sample input:
internationalization


Sample output:
i18n

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    s = input()
    n = len(s)
    print(s[0] + str(n-2) + s[-1])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
char = input()
length = len(char)

print('{}{}{}'.format(char[0], length-2, char[-1]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

x = len(S) - 2

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

Submission status: Accepted

Solution code:
s = str(input())

l = len(s)-2

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

Submission status: Accepted

Solution code:
s=input()

fir=s[0]
las=s[-1]

s=s[1:]
s=s[:-1]

print(fir+str(len(s))+las)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = input()
print("{}{}{}".format(s[:1], len(s[1:-1]), s[-1:]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: <encoding name> -*-

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())
x=int(len(s))
print(s[0],x-2,s[x-1],sep="")

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
import sys
s = list(sys.stdin.readline().rstrip("\n"))
i = s.pop(0)
f = s.pop(-1)
print(i+str(len(s))+f)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
head, *body, tail = input()
print(''.join(map(str, (head, len(body), tail))))

Submission status: Accepted

Solution code:
S=input()
print(*[S[0],len(S)-2,S[-1]],sep='')

Submission status: Accepted

Solution code:
S = input()

num = len(S) - 2

new = (S[0] + str(num) + S[len(S)-1])
print(new)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

    ans = "".join([s[0], str(len(s) - 2), s[-1]])

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
b = len(a)
print(a[0], end="")
print(b-2, end="")
print(a[b-1])

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
s1 = s[0]
s2 = s[-1]
l = len(s[1:-1])
print(s1+str(l)+s2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
code = input()

#1文字目
first_code = code[0]
last_code = code[len(code)-1]

print(first_code + str(len(code)-2) +last_code)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def main():
    s = input()
    print('%s%d%s' % (s[0], len(s) - 2, s[-1]))
 
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# ABC069 B

def main():
    s = input()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    s = list(input())
    start, end = s[0], s[-1]
    midle = len(s[1:-1])
    print("{}{}{}".format(start, midle, end))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
#N, K = map(int, input().split())
# 文字列の入力
s = input()
#開業されたN個要素を受け付ける
#list = [input() for i in range(N)]

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

Submission status: Accepted

Solution code:
s = input()
start = s[0]
end = s[-1]
length = str(len(s[1:-1]))
print(start + length + end)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
first = s.pop(0)
last = s.pop(-1)
print(str(first)+str(len(s))+str(last))

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
# endregion
s = rs()
print(s[0] + str(len(s)-2) + s[-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

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

Submission status: Accepted

Solution code:
s = input()
l = len(s) - 2

print(s[0], l, s[l + 1], sep = "")

Submission status: Accepted

Solution code:
s = str(input())

cnt = 0
for i in range(1,len(s)-1):
    cnt += 1

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

Submission status: Accepted

Solution code:
def main():
    s = input()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

for i in range(3):
  print(a[i],end="")

Submission status: Accepted

Solution code:
def actual(s):
    head = s[0]
    tail = s[-1]
    length = len(s[1:-1])

    return '{}{}{}'.format(head, length, tail)  # 3.4.3用

    # return f'{head}{length}{tail}'


s = input()

print(actual(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:

s = input()

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

Submission status: Accepted

Solution code:
s = input()
if len(s) >=3:
    a = s[0] + str((len(s)-2)) + s[-1]
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
voca = input()
 
output = voca[0] + str(int(len(voca) - 2) )+ voca[-1]
 
print(output)

Submission status: Accepted

Solution code:
voca = input()

a = len(voca) - 2

output = voca[0] + str(a) + voca[-1]
 
print(output)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2問目類題3
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,sqrt
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
 
s = input()

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

Submission status: Accepted

Solution code:
S = input()

number = len(S)-2
print(''.join([S[0],str(number),S[-1]]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    s =     _in[0]   # type:str
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    _s = s[0]+str(len(s[1:-1]))+s[-1]
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(_s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

apple = []
for i in s:
    apple.append(i)

a = apple.pop(0)
b = apple.pop(-1)
c = str(len(apple))
d = a + c + b
print(d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())
answer_list=[s[0]]+[str(len(s)-2)]+[s[-1]]
print("".join(answer_list))

Submission status: Accepted

Solution code:
def resolve():
	s = input()

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

Submission status: Accepted

Solution code:
s = input()
a = s[0]
b = s[-1]
long = len(s) - 2

print(a + str(long) + b)

Submission status: Accepted

Solution code:
S=input()
a=S[0]
b=S[-1]
c=len(S)-2
t=a+'%s' %c +b
print(t)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def resolve():
    # 整数 1 つ
    n = input()
    # 整数複数個
    # a, b, c = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]
    i = len(n) -2

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


resolve()

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

Solution code:
s=input()

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

print(a+str(c)+b)

Submission status: Accepted

Solution code:
s = input()

x = len(s)
y = x - 2

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = str(input())

A = n[0]
B = n[-1]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input())
l = int(len(S))
#print(l)
#print(S[0])
s1 = S[0]
s2 = S[-1]
L = int(l-2)

print(s1 + str(L) + s2)

Submission status: Accepted

Solution code:
word = list(input())

rep_word = []
num_abb = len(word) - 2

rep_word.append(word[0])
rep_word.append(str(num_abb))
rep_word.append(word[-1])

print(''.join(rep_word))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    S = input()
    cnt = len(S[1:-1])
    print("{}{}{}".format(S[0], cnt, S[-1]))


if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
word=str(input())
length=len(word[1:-1])
ans=word[0]+str(length)+word[-1]
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
s_length = len(s)
s_first = s[0]
s_last = s[-1]
answer = s_first + str(len(s)-2) + s_last
print(answer)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    s = input()
    res = ""
    cnt = 0
    for i in range(len(s)):
        if i == 0:
            res += s[i]
        elif i == len(s) - 1:
            res += str(cnt) + s[i]
        else:
            cnt += 1

    print(res)



if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().rstrip()

print("%s%d%s" % (s[:1], len(s)-2, s[-1]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
N = len(s)

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

Submission status: Accepted

Solution code:
# AtCoder
s = input()
mid = str(len(s) - 2)
print(s[0]+mid+s[-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
a = s[0]
b = len(s) - 2
c = s[-1]

print(a+str(b)+c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
n=len(s)
w=str(len(s)-2)

print(s[0]+w+s[-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
moji = str(input())
start = moji[0]
length = len(moji)
end = moji[length - 1]
centre = length - 2
print(start + str(centre) + end)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

print(''.join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
A=len(N)
#print(N[A-1])
print(N[0],end="")
print(len(N)-2,end="")
print(N[A-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
## coding: UTF-8
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

print("".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
# ABC 069: B – i18n
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
s = input()

char_number = len(s)

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

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

Submission status: Accepted

Solution code:
s=input()

n=len(s)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

figure = str(len(S)-2)

print(I + figure + B)

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
# 頭とお尻の文字数を引く
n = len(s) - 2
# 頭とお尻をくっつくて出力
print(s[0] + str(n) + s[-1])

Submission status: Accepted

Solution code:
a=input()

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

print(f+str(le)+l)

Submission status: Accepted

Solution code:
import io
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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])