def isValidSolution(sudoku):
  """ Checks if the given sudoku is a valid solution. """
  if len(sudoku) != 9:
    return False

  # Check rows
  for i in sudoku:
    if sorted(i) != [1,2,3,4,5,6,7,8,9]:
      return False

  # Check columns
  for i in range(9):
    temp = []
    for j in range(9):
      temp.append(sudoku[j][i])
    if sorted(temp) != [1,2,3,4,5,6,7,8,9]:
      return False

  # Check clusters
  for i in range(3):
    for j in range(3):
      temp = sudoku[i*3][j*3:j*3+3] + sudoku[i*3+1][j*3:j*3+3] + sudoku[i*3+2][j*3:j*3+3]
      if sorted(temp) != [1,2,3,4,5,6,7,8,9]:
        return False

  return True