public void setOuterFlag(int row, int column, char[][] board, int rows, int columns) {
            if (board[row][column] == 'X') return;
            
            Stack<Integer> rowAxisStack = new Stack<>();
            Stack<Integer> columnAxisStack = new Stack<>();
            rowAxisStack.push(row);
            columnAxisStack.push(column);
            while (!rowAxisStack.isEmpty()) {
                int tr = rowAxisStack.pop();
                int tc = columnAxisStack.pop();
                if (board[tr][tc] == 'O') {
                    board[tr][tc] = 'X';
                    outerRowAxis.add(tr);
                    outerColumnAxis.add(tc);

                    if (tr > 0) {
                        rowAxisStack.push(tr - 1);
                        columnAxisStack.push(tc);
                    }
                    if (tr < rows - 1) {
                        rowAxisStack.push(tr + 1);
                        columnAxisStack.push(tc);
                    }
                    if (tc > 0) {
                        rowAxisStack.push(tr);
                        columnAxisStack.push(tc - 1);
                    }
                    if (tc < columns - 1) {
                        rowAxisStack.push(tr);
                        columnAxisStack.push(tc + 1);
                    }
                }
            }
            /*if (board[row][column] == 'O') {
                outerRowAxis.add(row);
                outerColumnAxis.add(column);
                board[row][column] = 'X';

                if (row > 0) setOuterFlag(row - 1, column, board, rows, columns);
                if (row < rows - 1) setOuterFlag(row + 1, column, board, rows, columns);
                if (column > 0) setOuterFlag(row, column - 1, board, rows, columns);
                if (column < columns - 1) setOuterFlag(row, column + 1, board, rows, columns);
            }*/
        }