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:
import sys
stdin = sys.stdin

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

s = lc()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
res =''
counter = 0
for i in range(len(s)):
    if i == 0:
        res = res + s[i]
    elif i == len(s)-1:
        res = res + str(counter) + s[i]
    else:
        counter += 1
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = raw_input()
length = len(S)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
print('{0}{1}{2}'.format(s[0], len(s) - 2, 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 math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(1000000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v


# Width First Search (+ Distance)
def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk


# Depth First Search (+Distance)
def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


# --------------------------------------------

dp = None


def main():
    S = input()

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


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#69b
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:
#coding:utf-8
s = input()
ans = s[0] + str(len(s)-2) + s[-1]
print(ans)

Submission status: Accepted

Solution code:
# vim: set fileencoding=utf-8 :


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#-*-coding:utf-8-*-

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

print(res)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

ans=[S[0],str(len(S)-2), S[len(S)-1]]

print(''.join(ans))

Submission status: Accepted

Solution code:
word = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

s = input()

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

Submission status: Accepted

Solution code:
# input
s = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

test = raw_input()

head = test[0]
tail = test[-1]
middle_len = str(len(test[1:-1]))

result = head +  middle_len + tail 

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_str = input('')
start = input_str[:1]
end = input_str[-1:]
print(start + str((len(input_str) - 2)) + end)

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
string = input()
list_string = list(string)
num = len(list_string)-2
str_num = str(num)
print(string[0] + str_num + string[-1])

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str_list = list(input())
length = len(str_list)
len_2 = str(length-2)
connect = ''.join([str_list[0],len_2,str_list[length-1]])
print(connect)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

s = list(ns())
f = s[0]
del s[0]
l = s[-1]
del s[-1]
print(f + str(len(s)) + l)

Submission status: Accepted

Solution code:
s = input()
print(s[0]+str(len(s[1:len(s)-1]))+s[len(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 math
import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

s = arr_data[0][0]

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# AtCoder Beginner Contest
# Problem B

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

Submission status: Accepted

Solution code:
l = input()
m = list(l)

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

if (len(m)<3)or(len(m)>100):
    print("please input from 3~100")
else:
    print("{}{}{}".format(a,c,b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(str(input()))
first = s[0]
last = s[-1]

s.pop(0)
s.pop()
u = len(s)

print(str(first) + str(u) + str(last))

Submission status: Accepted

Solution code:
s=input()
ans=[]
ans.append(s[0])
ans.append(str(len(s)-2))
ans.append(s[-1])
ans=''.join(ans)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/python

import sys

s = sys.stdin.readline().strip()
l = len(s)
a = s[0] + str(l - 2) + s[-1]
print(a)

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s   = input()

head, mid, tail = s[0], s[1:-1], s[-1]

print(head + str(len(mid)) + tail)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()

if len(a) < 3 or 100 < len(a):
    print(a)
else:
    print(a[0]+str(len(a)-2)+a[len(a)-1])

Submission status: Accepted

Solution code:
word = input()
num = len(word) - 2
word_list = list(word)

print(word_list[0]+str(num)+word_list[num+1])

Submission status: Accepted

Solution code:
s = input()

l = len(s)

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

Submission status: Accepted

Solution code:
# coding:utf-8

S = raw_input()
ls=len(S)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = raw_input()
print (s[0] + '%d' + s[-1]) % (len(s) - 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

j = 0

for i in s:
    if j == 0:
        x = i
    z = i
    j = int(int(j) + 1)
y = int(int(j) - 2)

ans = str(str(x) + str(y) + str(z))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
http://abc069.contest.atcoder.jp/tasks/abc069_b

"""

def solve(text):
    text_length = len(text)
    return text[0] + str(text_length-2) + text[-1]

def main():
    S = input()
    result = solve(S)
    print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict
from itertools import product, groupby
from math import pi
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = 10 ** 10


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(raw_input())
li = list(s)
a = li[0]
z = li[len(li)-1]
del li[0]
del li[len(li)-1]
print a+str(len(li))+z

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
s_s = s[0]
s_e = s[-1]
s = s[1:-1]

nw = s_s + str(len(s)) + s_e
print(nw)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

print(res)

Submission status: Accepted

Solution code:
def solve(): # 069B - i18n
    s = input()
    n_between = len(s) - 2
    shorten = [s[0], str(n_between), s[-1]]
    print("".join(shorten))


solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


s=input()
l=len(s)-2
print(s[0] + str(l) + 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 = raw_input()
print "%s%d%s" % (s[0], (len(s)-2), s[-1])

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = raw_input()

st = s[0]
en = s[len(s) - 1]

ans = ""
ans += st
ans += str(len(s) - 2)
ans += en
print ans

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = raw_input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
print(s[0] + str(len(s[1:len(s) - 1])) + s[len(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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
gosa = 1.0 / 10**9
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    s = S()

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



print(main())

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
s = list(input())
a = s.pop(0)
b = s.pop()
print(a+str(len(s))+b)

Submission status: Accepted

Solution code:
#ABc069B

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

Submission status: Accepted

Solution code:
s = input()

out = s[0]
out += str(s.__len__()-2)
out += s[s.__len__()-1]

print(out)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

Submission status: Accepted

Solution code:
word = raw_input().strip()
print word[0] + str(len(word)-2) + word[-1]

Submission status: Accepted

Solution code:
s = raw_input().rstrip()
print s[0] + str(len(s)-2)+s[-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:
# coding: utf-8

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()

a_len = len(a)
f = a[0]
e = a[-1]

print(f+str(a_len-2)+e)

Submission status: Accepted

Solution code:
import sys

# sys.stdin = open('b1.in')


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


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


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


main()

Submission status: Accepted

Solution code:

def Solution(s):
    len = s.__len__()
    return s[0] + (str)(len-2) + s[len-1]

if __name__=="__main__":
    input = raw_input()
    output = Solution(input)
    print output

Submission status: Accepted

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

Submission status: Accepted

Solution code:
st = input()
length = len(st[1:-1])
print(st[0] + str(length) + st[-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:
word = input()
lists = list(word)
a = int(len(lists) -1)
print(lists[0]+str((int(len(lists))-2))+lists[a])

Submission status: Accepted

Solution code:
def omit(s):
    """
    @param: 元の文字列
    @return: 最初の文字 + 最初の文字と最後の文字にはさまれた文字列の流さ
    + 最後の文字

    >>> omit("internationalization")
    'i18n'

    >>> omit("smiles")
    's4s'

    >>> omit("xyz")
    'x1z'
    """

    s2 = list(s)

    (first,last) = (s2.pop(0), s2.pop(-1))
    return first + str(len(s2)) + last

print(omit(input()))

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

S_list = list(S)
Len= len(S)
queue = []

queue.append(S_list[0])
queue.append(str(Len-2))
queue.append(S_list[Len-1])

print("".join(queue))

Submission status: Accepted

Solution code:
def main():
    S = input()
    #print(S)
    len_S = len(S)
    print(S[0] + str(len_S - 2) + S[len_S - 1])
     
if __name__=="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
string=input('')
first=string[0]
last=string[len(string)-1]
mid=str(len(string[1:len(string)-1]))
print(first+mid+last)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
chr = input()
chr_list = list(chr)
length = len(chr_list)

a, z =  chr_list[0], chr_list[length - 1]

print(a, length - 2, z, sep = '')

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    S = input()
    STR = S[0:1] + str(len(S) - 2) + S[-1:]
    print(STR)

Submission status: Accepted

Solution code:
a=input().split()
b=list(a[0])
c=b[0]
d=b[-1]
l=len(b)-2
l=str(l)
print(c+l+d)

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = list(input())
c = len(n)
i = str(c-2)
a = [n[0],i,n[-1]]
print(''.join(a))

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
string = input()
cnt = 0
le = len(string)
for i in range(1,le-1):
    cnt =cnt +1
print(string[0],cnt,string[le-1],sep ='')

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !
a=input()
b=len(a)
ans=b-2
print(a[0]+str(ans)+a[-1])

Submission status: Accepted

Solution code:
chars=input()

f=chars[0]
l=chars[len(chars)-1]

n=str(len(chars)-2)

print(f+n+l)

Submission status: Accepted

Solution code:
import sys


def main():
    word = sys.stdin.readline().strip()
    print(word[0] + str(len(word) - 2) + word[len(word) - 1])

main()

Submission status: Accepted

Solution code:
s=input()

L=len(s)-2
M=str(L)

A=s[0]+M+s[-1]
print(A)

Submission status: Accepted

Solution code:
s = input()

init = s[0]
last = s[-1]
l = len(s) - 2

print(init + str(l) + last)

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

Solution code:
#!/usr/bin/python

import sys

def main(argv):
    for line in sys.stdin:
        s = line.rstrip("\n")
        print("{0}{1}{2}".format(s[0], len(s) - 2, s[-1]))

if __name__ == "__main__":
    main(sys.argv)

Submission status: Accepted

Solution code:
s = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! -*- coding:utf-8 -*-
s = str(input())
x = list(s)

e = x.pop()
a = x.pop(0)

print(a,len(x),e,sep='')

Submission status: Accepted

Solution code:
s = raw_input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=raw_input().strip()
n=len(s)-2
print ''.join([s[0],'%i'%n,s[-1]])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

word = input()

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

Submission status: Accepted

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

Submission status: Accepted

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