import java.util.Scanner; public class Main { public static void main(String[] a) { Scanner s=new Scanner(System.in); s.next(); s.useDelimiter("[ :\r\n]+"); int Z=0;while(s.hasNext()){ int H=s.nextInt(),M=s.nextInt(),h=s.nextInt(),m=s.nextInt(),S=H*60+M,E=h*60+m,T=S