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

int main(){
    string str;
    while(cin >> str){
        string res;
        bool begin=false;
        for(auto c: str){
            if(isdigit(c)){
                if(begin==false){
                    begin = true;
                    res+='*';
                }
            }else{
                if(begin){
                    res+='*';
                    begin = false;
                }
            }
            res+=c;
        }
        if(begin) res+='*';
        cout << res << endl;
    }
    return 0;
}