71A

#include <iostream>
#include <string>
using namespace std;

int main()
{
	string word;
	int length, n;
	cin>>n;
	for(int i=0; i<n; ++i)
	{
		cin>>word;
		length=word.size();
		if(length>10)
			cout<<word[0]<<length-2<<word[length-1]<<endl;
		else
			cout<<word<<endl;
	}
	return 0;
}

  

猜你喜欢

转载自www.cnblogs.com/ozxics/p/10640445.html
71A
71