Sahih al-Bukhari, Book 25, Hadith 233 (Bukhari 1693)

Narrated Ibn `Abbas:

The people were ordered to perform the Tawaf of the Ka`ba (Tawaf-al-Wada`) as the lastly thing, before leaving (Mecca), except the menstruating women who were excused.