<doocs>1275.Find Winner on a Tic Tac Toe Game_1.py
def tictactoe( moves: List[List[int]]) -> str:
    n = len(moves)
    counter = [0] * 8
    for i in range(n - 1, -1, -2):
        row, col = moves[i][0], moves[i][1]
        counter[row] += 1
        counter[col + 3] += 1
        if row == col:
            counter[6] += 1
        if row + col == 2:
            counter[7] += 1
        if (
            counter[row] == 3
            or counter[col + 3] == 3
            or counter[6] == 3
            or counter[7] == 3
        ):
            return "A" if (i % 2) == 0 else "B"
    return "Draw" if n == 9 else "Pending"
def sample_funcname ( var_0 : List [ List [ int ] ] ) -> str :
    var_5 = len ( var_0 )
    var_8 = [ 0 ] * 8
    for var_12 in range ( var_5 - 1 , - 1 , - 2 ) :
        var_13 , var_14 = var_0 [ var_12 ] [ 0 ] , var_0 [ var_12 ] [ 1 ]
        var_8 [ var_13 ] += 1
        var_8 [ var_14 + 3 ] += 1
        if var_13 == var_14 :
            var_8 [ 6 ] += 1
        if var_13 + var_14 == 2 :
            var_8 [ 7 ] += 1
        if ( var_8 [ var_13 ] == 3 or var_8 [ var_14 + 3 ] == 3 or var_8 [ 6 ] == 3 or var_8 [ 7 ] == 3 ) :
            return "A" if ( var_12 % 2 ) == 0 else "B"
    return "Draw" if var_5 == 9 else "Pending"
