#include <iostream>
#include <string>
using namespace std;
template<typename T>
T findMax(T value,T value2) {
if (value>value2) {
return value;
}
else {
return value2;
}
}
int main() {
string str1,str2;
str1="ab";
str2="cd";
cout<<findMax(6,4)<<endl;
cout<<findMax(5.31,4.31)<<endl;
cout<<findMax(str1,str2)<<endl;
cout<<findMax('d','A');
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwp0ZW1wbGF0ZTx0eXBlbmFtZSBUPgpUIGZpbmRNYXgoVCB2YWx1ZSxUIHZhbHVlMikgewogICAgaWYgKHZhbHVlPnZhbHVlMikgewogICAgICAgIHJldHVybiB2YWx1ZTsKICAgIH0KICAgIGVsc2UgewogICAgICAgIHJldHVybiB2YWx1ZTI7CiAgICB9Cn0KaW50IG1haW4oKSB7CglzdHJpbmcgc3RyMSxzdHIyOwoJc3RyMT0iYWIiOwoJc3RyMj0iY2QiOwoJY291dDw8ZmluZE1heCg2LDQpPDxlbmRsOwoJY291dDw8ZmluZE1heCg1LjMxLDQuMzEpPDxlbmRsOwoJY291dDw8ZmluZE1heChzdHIxLHN0cjIpPDxlbmRsOwoJY291dDw8ZmluZE1heCgnZCcsJ0EnKTsKCXJldHVybiAwOwp9Cg==