#include <iostream>
using namespace std;

class Set
    {
private:
    struct Node
    {
        int val;
        Node* link;
    };

    Node *cons(int x, Node *p);
    Node *list;


public:
    Set() {list = NULL;}
    bool isEmpty() const;
    int size() const;
    bool member (int x) const;
    bool insert (int x);
    bool remove (int x);
    void print() const;
    const Set operator+(const Set &otherSet)const;
    const Set operator*(const Set &otherSet)const;
    Node* getSet()const{return list;}
    void setList(Node *list);
    friend ostream& operator <<(ostream& outputStream, const Set &set);
    };
    
    ostream& operator <<(ostream& outputStream, const Set &set)
    {
              Set::Node *p;
              p = set.list;
              outputStream << '{';
              while(p->link != NULL)
              {
                outputStream << p->val;
                p = p->link;
              }
              outputStream << '}';
              return outputStream;
    }
    
int main() {
    return 0;
}