12H2S + 6CO2 → C6H12O6 + 6H2O + 12S
12H$_2$S + 6CO$_2$ → C$_6$H$_{12}$O$_6$ + 6H$_2$O + 12S
The system needs to have some reason to exist; for example, water electrolysis is an obvious way to produce oxygen from the products of H2SH$_2$S chemosynthesis, however the lifeforms on this planet need to have a reason (and way) to engage in water electrolysis.
This just means any other necessary biproductsbyproducts