public int read( int lo, int hi ) {
	BufferedReader input = 
	    new BufferedReader( new InputStreamReader(System.in) );
	int response = -1;
	   
	while ( response < lo || response > hi ) {
	       
	    //************Reads input.**************************
	    try {
		response = Integer.parseInt(input.readLine());
	    }
	    //Catch exceptions and ask for correct integer input
	    catch (IOException e) { 	    
	    }
	    catch (NumberFormatException e) { 	    
	    }
	    if ( response > hi || response < lo ) {
		System.out.print( "(Enter a valid integer value.) " );
		input = new BufferedReader( new InputStreamReader(System.in) );
	    }
	    //****************************************************
	}
	return response;
    }