Algorithm For Multistage Rocket Definition