public void solveDFS(char[][] board, int r, int c){
        if(r < 0 || r >= R || c >= C || c < 0) return;
        if(board[r][c] == 'X') return;
        if(visited[r][c]) return;
        visited[r][c] = true;

        solveDFS(board, r-1,c);
        solveDFS(board, r+1,c);
        solveDFS(board, r,c-1);
        solveDFS(board, r,c+1);

        return ;

    }