/* 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
	{
		LocalDateTime startDate = LocalDateTime.parse("2017-03-07T06:30:00");
		LocalDateTime endDate = LocalDateTime.parse("2017-03-07T11:35:00");
		LocalDateTime current = startDate;
		while (current.isBefore(endDate)) {
		    LocalDateTime nextHour = current.withMinute(0).plusHours(1);
		    LocalDateTime rangeEnd = nextHour.isBefore(endDate) ? nextHour : endDate;
		    System.out.printf("%s - %s%n", current, rangeEnd);
		    current = rangeEnd;
		}
	}
}