Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int t,i,s;
- string str;
- cin>>t;
- while(t--){
- cin>>str;
- s=str.size();
- if(s>10)
- cout<<str[0]<<(s-2)<<str[s-1]<<endl;
- else
- cout<<str<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement