In the first data set, a line
city1 city2means that the first city of the pair is south of the second city.
In response to each pair of cities in the second data set, the program is to print one of the following lines of output:
city1 is south of city2. city1 is north of city2. The relative position of city1 and city2 is unknown.The correct response depends upon all the facts established by the first data set.
The relation "is south of" is a transitive relationship, so if city1 is south of city2 and city2 is south of city3, then city1 is south of city3. You may assume that the input is consistent, that is, there will be no information that implies a city is south of itself.
Melbourne DaytonaBeach DaytonaBeach Jacksonville Orlando Jacksonville # Melbourne Jacksonville Tampa Melbourne Jacksonville Orlando Orlando DaytonaBeach #the output should be
Melbourne is south of Jacksonville. The relative position of Tampa and Melbourne is unknown. Jacksonville is north of Orlando. The relative position of Orlando and DaytonaBeach is unknown.In the input, the city pairs will be on the same line and separated by a least one space. You may assume that there are no leading and trailing spaces. The names of the cities consist only of upper and lower-case letters [a-zA-Z]. Capitialization of the names is significant. That is, DaytonaBeach is considered a different city than Daytonabeach. Each of the two sections of the input is ended by a line containing the single character #.