Complete integrability of the Kadomtsev-Petviashvili equations in 2 + 1 dimensions