A planet of radius R is made up of three segments; a core of radius R/3 and density r/3, a middle shell from radius R/3 to 2R/3 and density r/2, and an outer shell from radius 2R/3 to R and density 3 r. What is the average density of the planet as a whole