Organocatalyzed three-component Ugi and Passerini reactions of 4-oxoazetidine-2-carbaldehydes and azetidine-2,3-diones. Application to the synthesis of γ-lactams and γ-lactones.