At intramolecular cyclization of phenylhydrazinocarbothioamide in alkaline and acidic media quinolyl-substituted triazoles and thiadiazoles are obtained. Quinolyl-substituted thiazolidines and thiazolidinones were obtained at interaction of phenylhydrazinocarbothioamides with bromoacetophenone and ethyl bromoacetate.