#include <stdio.h>


int main(void){

    char a [1000] [1000] = {};

    int result = 1;

    int i = 0;

    int j = 0;

    int k, num;


    scanf("%d",&num);

    

    

    for(i = 0 ; i < num ; i++){

        for(j = 0 ; j <= num ; j++){

            scanf("%c",&a );

        }    

    }

    

    i = 0;

    j = 0;

    

    while(1){

        

        

        if(a[i][j] == 'W' && a[j][i] == 'W'){


            result = 0; //false


        }

        else if( a[i][j] == 'L' && a[j][i] == 'L'){

            result = 0; //false

        }

        else if( a[i][j] == 'D' && a[j][i] != 'D'){

            result = 0; //false

        }

        else if( a[i][j] != 'D' && a[j][i] == 'D'){

            result = 0; //false

        }

        

        if(result == 0){


            printf("incorrect"); 

            break;

 

        }

        else{

            j++;

        }


        if(j == num){

            i++;

            j = 0;

        }


        if(i == num){

            printf("correct");

            break;

        }

    }

    return 0;

}


위처럼 코딩했을 때 incorrect가 출력되게 하고싶은데 correct가 나오네요.. 어디서 잘못된건가요?