Novel self-condensation of 3-(azol-5-yl)-1,1-dimethylenamines has been found to form new C-C bonds leading to 2,4-(1,2,3-triazole-1,2,3-thiadiazole-3-phenylisothiazole)-(1E,3Z)-5-yl-butadiene-1-amines. The discovered reaction represents a new example of C-H functionalization in unsaturated systems and can serve an efficient synthetic approach to rational design of new 2,4-(diazole-5-yl)-dieneamines.