Java 100%
\nclass Solution {\n    private static char X = \'X\', O = \'O\';        \n    public boolean validTicTacToe(String[] board) {\n        int c1 = 0, c2 = 0;\n   
```\nclass Solution {\n    private static char X = \'X\', O = \'O\';        \n    public boolean validTicTacToe(String[] board) {\n        int c1 = 0, c2 = 0;\n        for (int i = 0; i < board.length; i++) {\n            for (int j = 0; j < board[0].length(); j++) {\n                if (board[i].charAt(j) == X) c1++;\n                else if (board[i].charAt(j) == O) c2++;\n            }\n        }\n        if (c1 < c2) return false;   // second player played first\n        if (c1 - c2 > 1) return false;\n        if (c1 >= 3 || c2 >= 3) {\n            boolean xwins = checkWin(board, X);\n            boolean owins = checkWin(board, O);\n            if (xwins && owins) return false;\n            if (xwins) {\n                return c1 == c2+1;\n            }\n            else if (owins) {\n                return c1 == c2;\n            }\n        }\n        return true;\n    }\n    \n    private boolean checkWin(String[] b, char c) {\n        return (\n            (b[0].charAt(0) == c && b[0].charAt(1) == c && b[0].charAt(2) == c) ||\n            (b[1].charAt(0) == c && b[1].charAt(1) == c && b[1].charAt(2) == c) ||\n            (b[2].charAt(0) == c && b[2].charAt(1) == c && b[2].charAt(2) == c) ||\n            (b[0].charAt(0) == c && b[1].charAt(0) == c && b[2].charAt(0) == c) ||\n            (b[0].charAt(1) == c && b[1].charAt(1) == c && b[2].charAt(1) == c) ||\n            (b[0].charAt(2) == c && b[1].charAt(2) == c && b[2].charAt(2) == c) ||\n            (b[0].charAt(0) == c && b[1].charAt(1) == c && b[2].charAt(2) == c) ||\n            (b[0].charAt(2) == c && b[1].charAt(1) == c && b[2].charAt(0) == c)\n        );\n    }\n}\n```
[]