/* package whatever; // don't place package name! */

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

import java.time.Month ;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
        Set< String > mySetOfStrings = new HashSet<>() ;
        mySetOfStrings.add( "dog" ) ;
        mySetOfStrings.add( "cat" ) ;
        mySetOfStrings.add( "bird" ) ;

        int index = 0 ;
		String s = mySetOfStrings.toArray( new String[0] )[ index ] ;
        System.out.println( s ) ;

        Set< Month > q1 = EnumSet.of( Month.MARCH , Month.JANUARY , Month.FEBRUARY ) ;  // An `EnumSet` iterates in the order in which the enum objects were defined.
        Month m = q1.toArray( new Month[0] )[ 1 ] ;  // Feb.
        System.out.println ( m ) ;


	}
}