Sahih Muslim, Book 51, Hadith 20 (Muslim 6960)

Ibn Umar reported Allah's Apostle (ﷺ) as saying:

The similitude of a hypocrite is that of a sheep which roams aimlessly between two flocks. She goes to one at one time and to the other at another time.