Take a closer look at the problem:
Lines first and second show no indication at all to what the ship's name might be. If we take a closer look at the last one though, we'll will uncover quite an interesting fact:
What is the name of the ship. <-- There i's no question mark!
What is the meaning of this? Well, it's not really a question, it's more of a hiddden information placed in a question-like sentence which is hardly a question. Well then, if it's not a question, what is not necessary and should not be added at the beginning of the sentece, unless, it's the name of the ship! Let's take a look at the sentence once more:
What is the name of the ship.
This might surprise you, but the answer is actually "what"!