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