Thermal stability and decomposition of sulphur and selenium compounds