/* 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
		.of( 2000 , Month.JANUARY , 1 )
		.datesUntil(
			Year.now().plusYears( 1 ).atDay( 1 )
		)
		.filter(
			localDate -> localDate.getMonth().equals( Month.AUGUST )
		)
		.filter(
			localDate -> localDate.getDayOfMonth() == 15
		)
		.filter(
			localDate -> localDate.getDayOfWeek().equals( DayOfWeek.TUESDAY )
		)
		.map(
			localDate -> Year.from( localDate )
		)
		.forEach(
			System.out :: println
		);
	}
}