How the planets are formed?