3D-printed structures that ‘remember’ original shapes