SCU 2005' Warmup Contest 18

H: Inherit the Spheres