#include <iostream>
template<class T1,class T2>
const T2& GetSecond(const T1& A, const T2& B){
return B;
}
template<class T1,class T2>
T2& GetSecond(T1& A,T2& B){
return B;
}
int main(){
char A = 1;
int B = 2;
std::cout << "Answer:" << GetSecond(A, B) << std::endl;
std::cout << "Answer:" << GetSecond(1, 2) << std::endl;
std::cout << "Answer:" << GetSecond(1, B) << std::endl;
std::cout << "Answer:" << GetSecond(A, 3) << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGU8Y2xhc3MgVDEsY2xhc3MgVDI+CmNvbnN0IFQyJiBHZXRTZWNvbmQoY29uc3QgVDEmIEEsIGNvbnN0IFQyJiBCKXsKCXJldHVybiBCOwp9CnRlbXBsYXRlPGNsYXNzIFQxLGNsYXNzIFQyPgpUMiYgR2V0U2Vjb25kKFQxJiBBLFQyJiBCKXsKCXJldHVybiBCOwp9CgppbnQgbWFpbigpewoJY2hhciBBID0gMTsKCWludCBCID0gMjsKCgoJc3RkOjpjb3V0IDw8ICJBbnN3ZXI6IiA8PCBHZXRTZWNvbmQoQSwgQikgPDwgc3RkOjplbmRsOwoJc3RkOjpjb3V0IDw8ICJBbnN3ZXI6IiA8PCBHZXRTZWNvbmQoMSwgMikgPDwgc3RkOjplbmRsOwoJc3RkOjpjb3V0IDw8ICJBbnN3ZXI6IiA8PCBHZXRTZWNvbmQoMSwgQikgPDwgc3RkOjplbmRsOwoJc3RkOjpjb3V0IDw8ICJBbnN3ZXI6IiA8PCBHZXRTZWNvbmQoQSwgMykgPDwgc3RkOjplbmRsOwoJcmV0dXJuIDA7Cn0=