#include<bits/stdc++.h> using namespace std; int main() { string s; cin>>s; string le=""; string ri=""; string c=""; int i=0; int j=s.size()-1; while(s[i]=='*') { le+='*'; i++; } while(s[j]=='*') { ri+='*'; j--; } for(int k=i;k<=j;k++) { if(s[k]!='*') { c+=s[k]; } } cout<<le<<c<<ri; return 0; } /************************************************************** Problem: 1125 User: chenkexin Language: C++ Result: Accepted Time:7 ms Memory:2076 kb ****************************************************************/