¿Qué pensaba Juan que le había dicho Pedro que había publicado la revista?
what thought John that him had said Pedro that had published the magazine
What did John think that Pedro had told him that the magazine had already published?