{"raw_statement":[{"iden":"problem statement","content":"$N$ players played a round-robin tournament.\nYou are given an $N$\\-by-$N$ table $A$ containing the results of the matches. Let $A_{i,j}$ denote the element at the $i$\\-th row and $j$\\-th column of $A$.  \n$A_{i,j}$ is `-` if $i=j$, and `W`, `L`, or `D` otherwise.  \n$A_{i,j}$ is `W` if Player $i$ beat Player $j$, `L` if Player $i$ lost to Player $j$, and `D` if Player $i$ drew with Player $j$.\nDetermine whether the given table is contradictory.\nThe table is said to be contradictory when some of the following holds:\n\n*   There is a pair $(i,j)$ such that Player $i$ beat Player $j$, but Player $j$ did not lose to Player $i$;\n*   There is a pair $(i,j)$ such that Player $i$ lost to Player $j$, but Player $j$ did not beat Player $i$;\n*   There is a pair $(i,j)$ such that Player $i$ drew with Player $j$, but Player $j$ did not draw with Player $i$."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 1000$\n*   $A_{i,i}$ is `-`.\n*   $A_{i,j}$ is `W`, `L`, or `D`, for $i\\neq j$."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$A_{1,1}A_{1,2}\\ldots A_{1,N}$\n$A_{2,1}A_{2,2}\\ldots A_{2,N}$\n$\\vdots$\n$A_{N,1}A_{N,2}\\ldots A_{N,N}$"},{"iden":"sample input 1","content":"4\n-WWW\nL-DD\nLD-W\nLDW-"},{"iden":"sample output 1","content":"incorrect\n\nPlayer $3$ beat Player $4$, while Player $4$ also beat Player $3$, which is contradictory."},{"iden":"sample input 2","content":"2\n-D\nD-"},{"iden":"sample output 2","content":"correct\n\nThere is no contradiction."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}