The All-Knowing

is episode 366 of the Naruto: Shippūden anime.

Summary
The reincarnated Hokage take in their surroundings. Hashirama wonders who Minato is, and is elated to discover he's the Fourth Hokage, and then apprehensive when Orochimaru tells him Tsunade is the Fifth Hokage. Orochimaru elucidates he did not bring them back to destroy Konohagakure, but to answer Sasuke's questions. Hiruzen confirms what Sasuke was told about Itachi and the village, and Orochimaru questions Tobirama's policies regarding the Uchiha during his time, which Tobirama defends, and explains how the Uchiha fall prey to strong feelings. Sasuke asks Hashirama what is the village and the purpose of shinobi, making it clear his answer would determine Sasuke's actions. Tobirama is outraged, and flares his chakra, only for Hashirama to also flare his, almost making the Naka Shrine crumble. Hashirama praises Itachi, and explains that a proper answer would take time. Orochimaru reveals to them the war Madara is waging, to which Minato and Tobirama sense Naruto and Madara in the distance. Tobirama tries to leave, but is restrained by Orochimaru. Hashirama figures that ignoring Sasuke's request would only create another Madara, which would make winning the war pointless. Hashirama begins with his final battle with Madara.

Trivia

 * The order of the Rashōmon changes between when Hashirama summoned and when they're destroyed. It changes from red, yellow, blue, green, and orange, to red, green, blue, yellow, and then orange.