"71A.py" - Views: 787 · Hits: 787 - Type: Public

x = input()

if x.isdigit() == False:
    i = len(x)
    j = i - 1
    k = i - 2

    xList = list(x)

    if len(xList) > 4:
        print(xList[0], int(k), xList[j], sep='', end='')
    else:
        print(x)
else:
    SystemExit