A tandem synthesis of functionalized azet-2$$(1H)$$(1H)-ones and azet-2$$(1H)$$(1H)-thiones