The initial stages of the carbonization of organic solids