Nanolithography using thermal stresses