We study the extension of the Kechris-Solecki-Todorcevic dichotomy on analytic graphs to dimensions higher than 2. We prove that the extension is possible in any dimension, finite or infinite. The original proof works in the case of the finite dimension. We first prove that the natural extension does not work in the case of the infinite dimension, for the notion of continuous homomorphism used in the original theorem. Then we solve the problem in the case of the infinite dimension. Finally, we prove that the natural extension works in the case of the infinite dimension, but for the notion of Baire-measurable homomorphism.