Spoon: getting wrong answer

i tried a lot. i have tried all the test cases i could think of. please help
link :- CodeChef: Practical coding for everyone

#include<stdio.h>
int main() {
int t, n, r, c, flag;
char temp;
char a[201][201];
scanf(“%d”, &t);

while(t–) {
scanf(“%d%d”, &r, &c);
for(int i=0;i<r;i++)
scanf(“%s”,&a[i]);

for(int i =0; i < r; i++) {
for(int j =0; j < c; j++) {
flag = 0;

    if(a[i][j] == 'S' || a[i][j] == 's')
    {
        if(j+4 < c && a[i][j+1] == 'p' || a[i][j+1] == 'P' &&
                      a[i][j+2] == 'o' || a[i][j+2] == 'O' &&
                      a[i][j+3] == 'o' || a[i][j+3] == 'O' &&
                      a[i][j+4] == 'n' || a[i][j+4] == 'N' )
                      flag = 1;
        else if(i+4 < r && a[i+1][j] == 'p' || a[i+1][j] == 'P' &&
                           a[i+2][j] == 'o' || a[i+2][j] == 'O' &&
                           a[i+3][j] == 'o' || a[i+3][j] == 'O' &&
                           a[i+4][j] == 'n' || a[i+4][j] == 'N' )
                    flag = 1;
        if(flag == 1) break;
    }
}
if(flag == 1) break;

}
if(flag == 1) printf(“There is a spoon!\n”);
else printf(“There is indeed no spoon!\n”);
}
return 0;
}