maxh in python - csg