#include <iostream>
using namespace std;
void replace(string &first, string &second) {
string tmp = first;
first = second;
second = tmp;
}
int main() {
string first, second;
cout << "Enter first string: " << endl;
getline(cin, first);
cout << "Enter second strings: " << endl;
getline(cin, second);
cout << "Entered strings: " << endl << "1st: " << first << endl << "2rd: " << second << endl;
replace(first, second);
cout << "Replaced strings: " << endl << "1st: " << first << endl << "2rd: " << second << endl;
return 0;
}