The story is told in four versions: B. Gittin 56b. See also Avot de-Rabbi Nathan, Version 1, 4, 22–24; Avot de-Rabbi Nathan, Version 2, 6, 19; Lamentations Rabbah 1:5, no. 31. The four different versions are conveniently available in Jacob Neusner, Development of a Legend (Leiden: Brill, 1970).