The wettability of a thin polymer film was modified twice by thermochemical nanolithography. By means of a first local chemical modification induced by an atomic force microscope tip heated to 110+/-20 degrees C, hydrophilic patterns are written over an originally hydrophobic polymer surface. By further heating to 190+/-20 degrees C, a second chemical modification reverses the local wettability change introduced by the first chemical modification. This write-read-overwrite capability can be particularly useful in the design of complex nanofluidic devices. (C) 2007 American Institute of Physics.