public void cover()
    {
        int max_size = 0;
        int max_index = 0;
        
        //pick the largest set to maximize the initial cover
        for(int i=0; i<this.sets.size(); i++)
        {
            TreeSet set = this.sets.get(i);
            
            if(set.size() > max_size)
            {
                max_size = set.size();
                max_index = i;
            }
        }
        
        System.out.print((max_index+1)+" ");
        
        this.remElements(max_index);
        
        while(this.universe.size() > 0)
        {
            max_index = 0;
            max_size  = Integer.MAX_VALUE;
            
            for(int i=0; i<this.sets.size(); i++)
            {
                
                TreeSet set = (TreeSet)this.sets.get(i).clone();

                int elems = 0;
                int max_occur = 0;
                
                while(set.size() > 0)
                {
                    if(this.universe.contains(set.pollFirst()))
                    {
                        elems++;
                    }
                }

                //minimize the size of the cover, so take set with less in size
                if(elems > max_occur && set.size() < max_size)
                {
                    max_index = i;
                    max_size = set.size();
                    max_occur = elems;
                }
                    
            }

            System.out.print((max_index+1)+" ");

            this.remElements(max_index);
        }
    }