To change the speed and direction of the spacecraft's flight without fuel consumption, you can use the "gravitational shock" when it moves near a planet. When the initial velocity of the spacecraft is u away from the planet, the velocity of which is v in the opposite direction, the spacecraft passes in such proximity to the planet that in the reference system of this planet, the direction of its movement changes by 90°. What is the speed of the spacecraft after leaving the planet? How does the spacecraft's flight direction change relative to the Sun?