Solution (source code)

= Solution

For $g\geq1$, the standard commutator-word polygon has one face, $2g$ paired edge classes and a single vertex class. Thus
$$
\boxed{\chi(X)=1-2g+1=2-2g.}
$$
An <orientable surface> admits continuously compatible local orientations; for a smooth <surface>, this is equivalently a continuous choice of <unit normal vector> in an oriented ambient three-dimensional space when such an embedding is available. In a polygonal model, orientability means the faces can be oriented so that induced boundary directions on each glued edge oppose one another. Here each edge label occurs once positively and once negatively. The orientation of the polygon therefore descends consistently across every seam. Hence \b[$X$ is orientable], and it is the <closed orientable surface> of genus $g$.