This page is still under construction.

Parts of this page are still being built. What you see may change.

AAAAHH! Overbooked!

Time limit1sMemory limit128 MB

Summary
Given N event time ranges in hh:mm-hh:mm format, check whether any two events overlap in time.
Level

Easy2 of 10

Topics
Intervals, Sorting
Solved
No attempts yet

Problem

Elaine is so excited for the new school year that she signed up for several events on the same day (sadly, this programming contest is not one of them). She may have overdone it, though — she never checked whether the events she signed up for overlap in time. While you sit here in the contest, why not check for her? Given the events Elaine registered for, decide whether any two of them conflict.

Input

The input consists of multiple test cases. Each test case begins with a single integer NN (1≤N≤1001 \le N \le 100) on its own line, the number of events. The next NN lines each give the start and end time of one event in 24-hour hh:mm-hh:mm format. The end time is always strictly later than the start time. The input ends with a line containing N=0N = 0, which must not be processed.

Output

For each test case, print a single line reading conflict (without quotes) if any two of Elaine's events overlap in time, or no conflict (without quotes) otherwise. Assume Elaine can travel across campus instantaneously, so if one event starts exactly when another ends, the two events do not conflict.

Examples4

  1. Example 1

    Input
    3
    09:00-09:50
    13:00-17:00
    09:50-10:30
    2
    10:00-11:00
    09:00-12:00
    0
    
    Expected output
    no conflict
    conflict
    
  2. Example 2

    Input
    1
    00:00-23:59
    0
    
    Expected output
    no conflict
    
  3. Example 3

    Input
    2
    09:00-10:00
    10:00-11:00
    0
    
    Expected output
    no conflict
    
  4. Example 4

    Input
    2
    09:00-10:00
    09:59-11:00
    0
    
    Expected output
    conflict