A mixture of the aldehyde (2 mmol), the -dicarbonyl compound (2 mmol), urea or thiourea (3 mmol) and silica sulfuric acid (0.23 g, equal to 0.6 mmol H+) in ethanol (10 ml) was refluxed for 6 h. After completion of the reaction, the solvent was evaporated under reduced pressure. The solid mixture was washed with cold water (20 ml) to remove the excess of urea or thiourea and then filtered. The remaining solid material was washed with hot ethyl acetate (30 ml). The filtrate was concentrated and the solid product was recrystallized from ethyl acetate/n-hexane or ethanol.