#include<iostream>
using namespace std;
int main()
{
string s;
while(cin>>s)
cout<<s[0]<<string(s.size()-2,'_')<<s[s.size()-1]<<endl;
}