import java.io.*;
import java.util.*;
class test  
{
    public static void main (String[] args) throws java.lang.Exception
    {
        System.out.println("hi");
        Set<String> set1=new HashSet<>();
        set1.add("london");
        set1.add("paris");
        set1.add("beijing");
        set1.add("sun");
        set1.add("new york");
        set1.add("new york");
        System.out.println("set1 is "+set1);
        System.out.println(set1.size()+" elements in set1");
        Set<String> set2=new HashSet<>();
        set2.add("london");
        set2.add("paris");
        set2.add("shanghai");
        System.out.println("set2 is "+set2);
        System.out.println(set2.size()+" elements in set2");
        System.out.println("if taipei in set2 "+set2.contains("taipei"));
        System.out.println("if london in set2 "+set2.contains("london"));
        set1.addAll(set2);
        System.out.println("set1 + set2 "+set1);
        set1.removeAll(set2);
        System.out.println("set1- set2 "+set1);
        set1.retainAll(set2);
        System.out.println("set1 & set2 "+set1);
        
    }
}