You are given n lines of a flat configuration file, each of the exact form key=value (the value may be empty and may itself contain =; always split a line on only its FIRST =). Keys are compared CASE-INSENSITIVELY for the purpose of detecting duplicates (so Timeout and timeout count as the same key), even though the exact text of each line may differ in case.
Scanning the lines from the first (line 1) to the last, find the first line whose key has already appeared (case-insensitively) on some earlier line. Print that line's 1-indexed line number. If no such duplicate exists among all n lines, print UNIQUE.
Input format
Line 1: an integer n.
Lines 2..n+1: each a key=value line.
Output format
A single line: either the 1-indexed line number of the first duplicate key, or UNIQUE.
Constraints
- 1 ≤ n ≤ 200
- each key consists of 1 to 30 ASCII letters, digits, and underscores
- each value has 0 to 20 characters, never containing a newline