A highly efficient multicomponent synthesis of pyridones and pyrimidones by a [2+2+2] strategy