Topographic engraving of structures in polymer surfaces attracts widespread interest for application in imprint lithography and data storage. We study the nonlinear interaction of nanoindents written in close proximity, 20-100 nm, to one another in a highly cross-linked polystyrene matrix. The indents are created thermomechanically by applying heat and force stimuli of 10 micros duration to a tip, thereby raising the polymer temperature to 250 degrees C and exerting contact pressures of up to 1 GPa. We show that on the nanoscale plastic deformation is highly reversible providing outstanding shape-memory functionality of the material.