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

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

import java.time.* ;

/* 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
	{

        LocalDate startOfYear = Year.of( 2019 ).atDay( 1 );  // Determine first day of the year.
        LocalDate startOfFollowingYear = startOfYear.plusYears( 1 );
        LocalDate localDate = startOfYear;
        List < LocalDate > tuesdays = new ArrayList <>( 55 ); // Set initialCapacity to maximum number of tuesdays in a year. Probably 53, but I'll go with 55 for good measure.
        while ( localDate.isBefore( startOfFollowingYear ) )
        {
            if ( localDate.getDayOfWeek().equals( DayOfWeek.TUESDAY ) )
            {
                tuesdays.add( localDate );
            }
            // Set up the next loop.
            localDate = localDate.plusDays( 1 );
        }
        System.out.println( tuesdays );
        
	}
}