#C11288. Dictionary Consistency Check
Dictionary Consistency Check
Dictionary Consistency Check
You are given a dictionary of translation pairs. Each pair consists of an original word and its translated word. The dictionary is considered consistent if for every original word, all of its translations are identical. In other words, for every original word a with translations b and c in the list, we require that (b = c). If the dictionary is consistent, output "CONSISTENT"; otherwise, output "INCONSISTENT". Note that the dictionary may be empty, in which case it is considered consistent.
inputFormat
The first line of input contains an integer (n) ((0 \leq n \leq 10^5)), the number of translation pairs. Each of the following (n) lines contains two non-empty strings separated by space: the original word and its translation. It is guaranteed that the words do not contain whitespace.
outputFormat
Output a single line with the word "CONSISTENT" if the dictionary is consistent, or "INCONSISTENT" otherwise.## sample
3
hello bonjour
world monde
hello bonjour
CONSISTENT