//sstream头文件中的stringstream函数可以用来遍历和分割数组
include [HTML_REMOVED]
include [HTML_REMOVED]
include [HTML_REMOVED]
using namespace std;
int main(){
string str;
string str1;
string str2;
string output;
getline(cin,str);
getline(cin,str1);
getline(cin,str2);
stringstream input(str);//stringstream分割数组,空格为一次
string word;
while(input>>word){
if(word==str1){
output+=str2+" ";
}else{
output+=word+" ";
}
}
cout<<output<<'\n';
return 0;
}