A characterization of punctured n-spheres