#include <iostream>
#include <string>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s;
int state = 0;
int one = 0;
if (!getline(cin, s))return 0;
for(int i=0;i<s.size();i++){
if(s[i]=='1'){
s[i]='_';
one++;
if(one%2==0){
state=2;
}else{
state=1;
}
}
else if (s[i] == '*') {
if (state == 1) {
s[i] = 'f';
}
else if (state == 2) {
s[i] = 't';
}
}
}
cout<<s;
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: