Testing#1171

Testing

1 second
64 megabytes
Easy

Sofiyka, a girl who frequently solves programming problems, knows that after writing a solution, testing is necessary. While she easily devises various tests, they often violate the constraints set in the problem statement.

For Sofiyka, this is a problem, but for you, it's a task. Check whether the created test meets the problem's constraints.

The constraints are written in TeX format, consisting of text and formulas. Formulas are written either between single dollar signs (for example, 1 < a < 100) or between pairs of dollar signs (for example,

1 < a, b < n

). Each formula has one of the following forms:

<values> <sign> <value>
<value> <sign> <values>
<value> <sign> <values> <sign> <value>

Here, <value> is either a number or a variable; <values> is a list of one or more variables separated by commas; <sign> is an inequality sign: , , , or . Any amount of whitespace (spaces, tabs, line breaks) may appear between different parts of a formula, as well as between the delimiter signs and the formula parts. There is at least one character between different formulas. Dollar signs () appear only at formula boundaries in the input file. There are n variables in the input file, with names a, b, .... All numbers in the formulas are integers and do not exceed 10^9 in absolute value. \InputFile The first line of the input file contains one integer n — the number of variables in the test for the problem 1 n 26. The second line contains the values of the variables to be checked, in the order a, b, ..., , where n-th letter of the Latin alphabet. From the third line onward, the text is written. It is guaranteed to be correct and contains only the formulas specified in the problem. The input file contains no more than 10^4 characters, including spaces and line breaks. All numbers included in the formulas, as well as variable values, are integers and do not exceed 10^9$ in absolute value.

Output

Print "Correct" if the test is correct. Otherwise, print "Incorrect" on the first line and, in the following lines, print the numbers of the formulas in which constraints are violated, one per line in increasing order. Formulas are numbered from one in the order they appear in the input file.

Examples

Example 1

Loading
Loading