How did the Enlightenment affect societies during the nth and nth centuries?