#include <iostream>
#include <string>
using namespace std;
template <typename T>
string f(const T& var)
{
return "sam durak";
}
template <typename T>
T square(T v) { return v*v; }
int f(int v)
{
cout << "int" << endl;
return square(v);
}
double f(double v)
{
cout << "double" << endl;
return square(v);
}
class Shit
{
};
int main()
{
cout << f(4) << endl;
cout << f(5.7) << endl;
Shit s;
cout << f(s) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnRlbXBsYXRlIDx0eXBlbmFtZSBUPgpzdHJpbmcgZihjb25zdCBUJiB2YXIpCnsKICAgIHJldHVybiAic2FtIGR1cmFrIjsKfQoKdGVtcGxhdGUgPHR5cGVuYW1lIFQ+ClQgc3F1YXJlKFQgdikgeyByZXR1cm4gdip2OyB9CgppbnQgZihpbnQgdikKewogICAgY291dCA8PCAiaW50IiA8PCBlbmRsOwogICAgcmV0dXJuIHNxdWFyZSh2KTsKfQoKZG91YmxlIGYoZG91YmxlIHYpCnsKICAgIGNvdXQgPDwgImRvdWJsZSIgPDwgZW5kbDsKICAgIHJldHVybiBzcXVhcmUodik7Cn0KCmNsYXNzIFNoaXQKewoKfTsKCmludCBtYWluKCkKewoKICAgIGNvdXQgPDwgZig0KSA8PCBlbmRsOwogICAgY291dCA8PCBmKDUuNykgPDwgZW5kbDsKCiAgICBTaGl0IHM7CiAgICBjb3V0IDw8IGYocykgPDwgZW5kbDsKCiAgICByZXR1cm4gMDsKfQo=