Theseus' Ship

Theseus is remembered in Greek mythology as the slayer of the Minotaur. For years, the Athenians had been sending sacrifices to be given to the Minotaur, a half-man, half-bull beast who inhabited the labyrinth of Knossos. One year, Theseus braved the labyrinth, and killed the Minotaur.
The ship in which he returned was long preserved. As parts of the ship needed repair, it was rebuilt plank by plank. Suppose that, eventually, every plank was replaced; would it still have been the same ship? A strong case can be made for saying that it would have been: When the first plank was replaced, the ship would still have been Theseus' ship. When the second was replaced, the ship would still have been Theseus' ship. Changing a single plank can never turn one ship into another. Even when every plank had been replaced, then, and no part of the original ship remained, it would still have been Theseus' ship.
Suppose, though, that each of the planks removed from Theseus' ship was restored, and that these planks were then recombined to once again form a ship. Would this have been Theseus' ship? Again, a strong case can be made for saying that it would have been: this ship would have had precisely the same parts as Theseus' ship, arranged in precisely the same way.
If this happened, then, then it would seem that Theseus had returned from Knossos in two ships. First, there would have been Theseus' ship that has had each of its parts replaced one by one. Second, there would have been Theseus' ship that had been dismantled, restored, and then reassembled. Each of them would have been Theseus' ship.
Theseus, though, sailed in only one ship. Which one?