Professional Documents
Culture Documents
Import Sys S Sys - Stdin.read y S.split ('/N') Y.pop (0) Forxiny: If Len (X) 10: Print (X (0) +STR (Len (X (1:-1) ) ) +X (-1) ) Else: Print (X)
Import Sys S Sys - Stdin.read y S.split ('/N') Y.pop (0) Forxiny: If Len (X) 10: Print (X (0) +STR (Len (X (1:-1) ) ) +X (-1) ) Else: Print (X)
s=sys.stdin.read()
y=s.split('\n')
y.pop(0)
for x in y:
if len(x)>10:
print(x[0]+str(len(x[1:-1]))+x[-1])
else:
print(x)