CPython lite logoProblemsContests

28. Long Words

You are given a number n and n strings. Output these strings in the given order, but if the length of a string is greater than 10, only output the first and last characters of that string.


Input

The first line contains a natural number n(1n1000).

The next n lines contain the strings si(1|si|1000).

Output

Output the strings in the given order and according to the given condition.


Sample input 1

6
abc
Acb
a
ABCDEFGHJKIL
1234567890
11111111111

Sample output 1

abc
Acb
a
AL
1234567890
11

Login to be able to submit.

BasicStringsLoops
331 / 24
Solved / unsolved count
1.0 s / 512 MB
Limits