Methylhydrazine (4.47 mL, 84.99 mmol) was added slowly and dropwise to a solution of ethyl 3-oxohexanoate (11.06 g, 84.99 mmol) in anhydrous ethanol (100 mL) at 0 °C. The reaction system was naturally warmed to room temperature with continuous stirring for 3.5 hours. Subsequently, the reaction mixture was heated to 60 °C and the reaction was continued for 10 hours and kept at reflux for 2.5 hours. Upon completion of the reaction, the mixture was concentrated to dryness using a rotary evaporator to afford intermediate 4 as a viscous pink solid (9.52 g, 100% yield). The structure of intermediate 4 was confirmed by 1H NMR (400 MHz, CDCl3) and mass spectrometry (ESI): 1H NMR (400 MHz, CDCl3) δ (ppm): 5.06 (s, 1H), 3.85 (bs, 1H), 3.32 (s, 3H), 1.94 (s, 3H); MS (ESI): m/z calculated value ( C15H9N2O) was 113.1 and the measured value was 113.2 ([M+H]+).