#include <iostream>
using namespace std;

template <class T>
class Set
{
    public:
        Set();
        ~Set();
        void push(const T&);
        bool belongs(const T&) const;
        void remove(const T&);
        const T& min() const;
        const T& max() const;
        unsigned int cardinal() const;
        void show(std::ostream&) const;

        friend ostream& operator<<(ostream& os, const Set<T> &c) {
            c.show(os);
            return os;
        }
        struct Node
        {
            Node(const T& v);
            T value;
            Node* left;
            Node* right; 
        };
    private:



        Node* root_;
        int cardinal_;

    // This function is the one with errors.
    Node & fatherOfNode(const Node & root, const T & key, const bool hook) const;

};

template <class T>
typename Set<T>::Node & Set<T>::fatherOfNode(const Set<T>::Node & root, const T & key, const bool hook) const {
    // Some code
}

int main() {
	

	// your code goes here
	return 0;
}