Given the ability of 1,5-dicarbonyl compounds to emerge in the presence of ammonia, urea and its derivatives of N-containing heterocyclic compounds, possibility of сyclization 2-pentene- and pentane-1,5-diones and their dihalogensubstituted analogues with thioacetamide.