Elastic punching of material during flattening of a spherical asperity and restoration of the imprint in unloading