#include <iostream>
using namespace std;
class A
{
private:
int val;
public:
A( int val );
bool operator >( const A & );
void print( );
};
A::A( int val )
{
this->val = val;
}
bool A::operator >( const A &other )
{
return val > other.val;
}
void A::print( )
{
cout << val;
}
int main( )
{
A a( 5 );
A b( 7 );
A c = a > b ? a : b;
c.print( );
cout << endl;
}