mirror of
https://github.com/tiennm99/codeforces.git
synced 2026-06-09 10:12:55 +00:00
25 lines
365 B
C++
25 lines
365 B
C++
#include <iostream>
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
int n;
|
|
cin >> n;
|
|
while (n--)
|
|
{
|
|
string s;
|
|
cin >> s;
|
|
if (s.length() > 10)
|
|
{
|
|
cout << s[0] << s.length() - 2 << s[s.length() - 1] << endl;
|
|
}
|
|
else
|
|
{
|
|
cout << s << endl;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|