Recyclization of 2,6-diamino-4-aryl(cyclohexyl)-3,5-dicyano-4H-thio(seleno)pyrans in the presence of an equimolar amount of an a-bromo carbonyl compound, ethyl iodide, 1,2-dibromoethane, or 3-chlorophenyl isocyanate yields, respectively, 3-aryl(cyclohexyl)-2-[thiazol(selenazol)-2-yl]acrylonitriles, 6-amino-4-phenyl-2-ethylsulfanyl-1,4-dihydropyridine-3,5-dicarbonitrile, 5-amino-7-phenyl-2,3,4,7-tetrahydrothiazolo[3,2-a]pyridine-6,8-dicarbonitrile, or N,N`-bis(3-chlorophenyl)urea.It was shown previously [133] that recyclization of 2,6-diamino-4-alkyl(aryl, heteryl)-3,5-dicyano-4H-thio(seleno)pyrans in refluxing ethanol in the presence of N-methylmorpholine yields N-methylmorpholinium 6-amino-4-alkyl(aryl, heteryl)-3,5-dicyano-2-thio(seleno)lates. With hydrazine or aniline used as the base in the reaction, 2,6-dihydrazino-4-phenyl-3,5-dicyanopyridine or 6-amino-2-phenylamino-4-phenyl-3,5-dicyanopyridine, respectively, is formed [4]. At the same time, with pyridinium ylides or aliphatic ketones used as CH acids in this recyclization, 3-(1-pyridinio)-5-cyano-3,4-trans-1,2,3,4-tetrahydro-6-pyridinethiolate [5] or 5,6-dialkyl-4-aryl-3-cyanopyridine-2(1H)-thiones [6], respectively, are formed as a result of interchange of the methylene components.Here we report on the recyclization of 2,6-diamino-4-aryl(cyclohexyl)-3,5-dicyano-4H-thio(seleno)pyrans Ia3Ii in the presence of an equimolar amount of an a-bromo carbonyl compound IIa3IIm, ethyl iodide, 1,2-dibromoethane, or 3-chlorophenyl isocyanate. The reactions of Ia3Ii with a-bromo ketones IIa3IIm in refluxing ethanol yield substituted acrylonitriles IIIa3 IIIz and IIIa. This reaction pathway involves opening of the thio(seleno)pyran ring with the formation of unstable thio(seleno)amides of aryl(cycloalkyl)methylenecyanoacetic acid A and malonodinitrile. This is followed by the Hantzsch reaction yielding 2-aryl(cyclohexyl)-2-[thiazol(selenazol)-2-yl]acrylonitriles IIIa3IIIz and IIIa, which are potentially bioactive compounds [7,8]. Recyclization of thiopyran Ih with an equimolar amount of ethyl iodide yields 6-amino-4-phenyl-2-ethylsulfanyl-1,4-dihydropyridine-3,5-dicarbonitrile IV. The scheme of its formation apparently involves regioselective S-alkylation of A with ethyl iodide to the corresponding 1,4-dihydropyridine IV.Replacement of ethyl iodide in this reaction by 1,2-dibromoethane led to the formation of 5-amino-7-phenyl-2,3,4,7-tetrahydrothiazolo[3,2-a]pyridine-6,8-dicarbonitrile V. Thus, in this case the reaction goes beyond formation of sulfide D and involves subsequent chemoselective intramolecular alkylation of the nitrogen atom of the dihydropyridine ring with the bromoethyl group, yielding heterocyclic system V.