import java.util.*;

public class collection{
	Vector v;
	ArrayList al;
	Hashtable ht;
	HashSet hs;
	TreeSet ts;
	HashMap hm;
	TreeMap tm;
	
	public collection(){
		v = new Vector();
		al = new ArrayList();
	    ht = new Hashtable();
	    hs = new HashSet();
	    ts = new TreeSet();
	    hm = new HashMap();
	    tm = new TreeMap();
	    
	    v.add("One");
	    v.add("Two");
	    v.add("Three");
	    
	    al.add("One");
	    al.add("Two");
	    al.add("Three");
	    al.add("Three");
	    
	    ts.add("One");
	    ts.add("Two");
	    ts.add("Three");
	    
	    hs.add("One");
	    hs.add("Two");
	    hs.add("Three");
	    hs.add("Three");
	    
	    hm.put("1","One");
	    hm.put("3","Three");
	    hm.put("2","Two");

	    tm.put("1","One");
	    tm.put("3","Three");
	    tm.put("2","Two");

	    
	    displayCollection(v);
	    displayCollection(al);
	    displayCollection(ts);
	    displayCollection(hs);
	    System.out.println();
	    displayCollection(hm);
	    displayCollection(tm);
	    System.out.println(v.toString());
	    System.out.println(al.toString());
	    System.out.println(ts.toString());
	    System.out.println(hs.toString());
	    System.out.println(hm.toString());
	    System.out.println(tm.toString());
	}
			
		void displayCollection(Collection c){
			Iterator it = c.iterator();
			while (it.hasNext()) System.out.println(it.next());		
		}
		
		void displayCollection(Map m){
			String entry;
			String value;
			Iterator it = m.keySet().iterator();
			while (it.hasNext()){
				entry = (String) it.next();
				value = (String) m.get(entry);
				System.out.println(entry+"  "+value);
			}
			
		}

	
	
	
	public static void main(String args[]){
		new collection();	
	}
}