#abc261b. [abc261_b]Tournament Result

[abc261_b]Tournament Result

Problem Statement

NN players played a round-robin tournament.

You are given an NN-by-NN table AA containing the results of the matches. Let Ai,jA_{i,j} denote the element at the ii-th row and jj-th column of AA.
Ai,jA_{i,j} is - if i=ji=j, and W, L, or D otherwise.
Ai,jA_{i,j} is W if Player ii beat Player jj, L if Player ii lost to Player jj, and D if Player ii drew with Player jj.

Determine whether the given table is contradictory.

The table is said to be contradictory when some of the following holds:

  • There is a pair (i,j)(i,j) such that Player ii beat Player jj, but Player jj did not lose to Player ii;
  • There is a pair (i,j)(i,j) such that Player ii lost to Player jj, but Player jj did not beat Player ii;
  • There is a pair (i,j)(i,j) such that Player ii drew with Player jj, but Player jj did not draw with Player ii.

Constraints

  • 2leqNleq10002 \\leq N \\leq 1000
  • Ai,iA_{i,i} is -.
  • Ai,jA_{i,j} is W, L, or D, for ineqji\\neq j.

Input

Input is given from Standard Input in the following format:

NN A1,1A1,2ldotsA1,NA_{1,1}A_{1,2}\\ldots A_{1,N} A2,1A2,2ldotsA2,NA_{2,1}A_{2,2}\\ldots A_{2,N} vdots\\vdots AN,1AN,2ldotsAN,NA_{N,1}A_{N,2}\\ldots A_{N,N}

Output

If the given table is not contradictory, print correct; if it is contradictory, print incorrect.


Sample Input 1

4
-WWW
L-DD
LD-W
LDW-

Sample Output 1

incorrect

Player 33 beat Player 44, while Player 44 also beat Player 33, which is contradictory.


Sample Input 2

2
-D
D-

Sample Output 2

correct

There is no contradiction.