Thermal degradation of nitrogen-containing polymers, acrylonitrile-butadiene-styrene and styrene-acrylonitrile