import java.util.*;
import java.lang.*;

class Main
{

    public static <E> Set<E> unique(Set<? extends E>... sets){
       Set<E> once = new HashSet<E>();
       Set<E> twice = new HashSet<E>();

       for(Set<? extends E> set:sets){
          for(E el:set){
             if(once.contains(el)){
                twice.add(el);
             } else {
                once.add(el);
             }
          }
       }
       
       once.removeAll(twice);
       return once;
    } 

    public static void main (String[] args) throws java.lang.Exception
	{
        Set<Integer> a = new HashSet<Integer>();
                a.add(2);
                a.add(4);
                a.add(6);
        a.add(8);
        a.add(9);
 
                Set<Integer> b = new HashSet<Integer>();
                b.add(2);
        a.add(8);
                b.add(9);
 
                Set<Integer> c = new HashSet<Integer>();
                c.add(2);
                c.add(4);
                c.add(8);
        a.add(9);
        
        Set<Integer> s= unique(a, b, c);
        
        for (int t : s) {
                        System.out.print(t + ", ");
                }                    
	}
}