#include <iostream>
#include <string>
using namespace std;
template<typename T>
void swapValues(T &value,T &value2) {
T swap=value;
value=value2;
value2=swap;
}
int main() {
int a=5,b=10;
swapValues(a,b);
cout<<a<<" "<<b<<endl;
double c=4.23,d=5.81;
swapValues(c,d);
cout<<c<<" "<<d<<endl;
char s='A',f='R';
swapValues(s,f);
cout<<s<<" "<<f<<endl;
string str1="hello",str2="world";
swapValues(str1,str2);
cout<<str1<<" "<<str2;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwp0ZW1wbGF0ZTx0eXBlbmFtZSBUPgp2b2lkIHN3YXBWYWx1ZXMoVCAmdmFsdWUsVCAmdmFsdWUyKSB7CiAgICBUIHN3YXA9dmFsdWU7CiAgICB2YWx1ZT12YWx1ZTI7CiAgICB2YWx1ZTI9c3dhcDsKfQppbnQgbWFpbigpIHsKCWludCBhPTUsYj0xMDsKICAgIHN3YXBWYWx1ZXMoYSxiKTsKICAgIGNvdXQ8PGE8PCIgIjw8Yjw8ZW5kbDsKICAgIGRvdWJsZSBjPTQuMjMsZD01LjgxOwogICAgc3dhcFZhbHVlcyhjLGQpOwogICAgY291dDw8Yzw8IiAiPDxkPDxlbmRsOwogICAgY2hhciBzPSdBJyxmPSdSJzsKICAgIHN3YXBWYWx1ZXMocyxmKTsKICAgIGNvdXQ8PHM8PCIgIjw8Zjw8ZW5kbDsKICAgIHN0cmluZyBzdHIxPSJoZWxsbyIsc3RyMj0id29ybGQiOwogICAgc3dhcFZhbHVlcyhzdHIxLHN0cjIpOwogICAgY291dDw8c3RyMTw8IiAiPDxzdHIyOwoJcmV0dXJuIDA7Cn0=