Spaceship class solution