
import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.*;
import java.time.temporal.ChronoField;
import java.time.temporal.ChronoUnit;

class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		LocalTime now = LocalTime.now();
		System.out.println(now);
		
		LocalTime next = now.with((temp) -> {
			int currentMinute = temp.get(ChronoField.MINUTE_OF_DAY);
    		int interval = (currentMinute / 15) * 15;
    		interval = interval - currentMinute;
    		temp = temp.plus(interval, ChronoUnit.MINUTES);
    		return temp.plus(15, ChronoUnit.MINUTES);
		});
		System.out.println(next);
	}
}