0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-05 02:26:26 +00:00
OI-codes/AcWing/770/770.cpp

21 lines
332 B
C++

#include <bits/stdc++.h>
using namespace std;
int main() {
string s, s1, s2;
getline(cin, s);
stringstream ss;
ss << s;
cin >> s1 >> s2;
while (ss >> s) {
if (s == s1) {
cout << s2 << ' ';
} else {
cout << s << ' ';
}
}
cout << endl;
return 0;
}