input: Write a python function to determine the winner of a tic-tac-toe game.
  assert check_winner([["X", "X", "X"], ["-", "-", "-"], ["-", "-", "-"]]) == "X"
  assert check_winner([["X", "O", "X"], ["O", "O", "O"], ["X", "-", "X"]]) == "O"
  assert check_winner([["X", "-", "O"], ["-", "X", "O"], ["-", "-", "X"]]) == "X"
  assert check_winner([["-", "O", "X"], ["O", "X", "O"], ["X", "O", "X"]]) == "X"
  assert check_winner([["-", "O", "X"], ["O", "X", "-"], ["X", "O", "O"]]) == False
output: def check_winner(board):
      # Check rows for a winner
      for row in board:
          if row[0] == row[1] == row[2] and row[0] != "-":
              return row[0]
      
      # Check columns for a winner
      for col in range(3):
          if board[0][col] == board[1][col] == board[2][col] and board[0][col] != "-":
              return board[0][col]
      
      # Check diagonals for a winner
      if board[0][0] == board[1][1] == board[2][2] and board[0][0] != "-":
          return board[0][0]
      if board[0][2] == board[1][1] == board[2][0] and board[0][2] != "-":
          return board[0][2]
      
      return False