AtCoder Beginner Contest 069 - i18n

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-----
internationalization

-----Sample Output-----
i18n

Difficulty: EASY

Starter code:

Solutions:
s = input()
s_len = len(s)
(head, tail) = (s[0], s[s_len - 1])
print(head + str(s_len - 2) + tail)


a = input()
print(f'{a[0]}{len(a) - 2}{a[len(a) - 1]}')


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


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


s = input()
print(f'{s[0]}{len(s) - 2}{s[-1]}')


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


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


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


(s, *t, r) = input()
print(s + str(len(t)) + r)


(a, *b, c) = map(str, input())
print(a + str(len(b)) + c)


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


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


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


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


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


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


(a, *List, b) = input()
print(a + str(len(List)) + b)


(F, *M, L) = list(input())
print(F + str(len(M)) + L)


(s, *d, f) = input()
print(s + str(len(d)) + f)


n = input()
n = list(n)
a = n.pop(0)
b = n.pop()
c = len(n)
print(a + str(c) + b)


def main():
	s = input()
	print(f'{s[0]}{len(s) - 2}{s[-1]}')

def __starting_point():
	main()
__starting_point()


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


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


s = input()
(a, *b, c) = s
print(a + str(len(b)) + c)


(c, *s, d) = input()
print(c + str(len(s)) + d)


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


(a, *b, c) = input()
print(a + str(len(b)) + c, end='')


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


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


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


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


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


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


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


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


import sys

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

def __starting_point():
	main()
__starting_point()


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


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


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


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


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


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


(a, *l, b) = input()
print(a + str(len(l)) + b)


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


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


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


(x, *s, y) = input()
print(x + str(len(s)) + y)


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


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


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


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


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


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


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


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


S = input()
prefix = S[0]
sufix = S[-1]
content = str(len(S[1:-1]))
print(prefix + content + sufix)


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


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


(s1, *s2, s3) = map(str, input())
print(s1 + str(len(s2)) + s3)


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


def answer(s: str) -> str:
	return f'{s[0]}{len(s) - 2}{s[-1]}'

def main():
	s = input()
	print(answer(s))

def __starting_point():
	main()
__starting_point()


s = list(input())
a = ''
b = s.pop(0)
c = s.pop()
a += b
a += str(len(s))
a += c
print(a)


(a, *list, b) = input()
print(a + str(len(list)) + b)


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


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


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


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


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


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


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


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


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


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


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


(a, *s, z) = input()
print('{}{}{}'.format(a, len(s), z))


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


(s, *t, r) = input()
print(s + '%d' % len(t) + r)


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


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


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