#include <iostream>
using namespace std;

int main() {
    string str;
    cin>>str;
    for(auto& c:str){
        if(c=='5'){
            c='*';
        }
    }
    cout<<str;
}

用了这个方法还是不要动脑子了。