 It is Aarne-Thompson type 531.Other tales of this type include "Ferdinand the Faithful and Ferdinand the Unfaithful", "Corvetto", "King Fortunatus's Golden Wig", and "The Firebird and Princess Vasilisa".Another, literary variant is Madame d'Aulnoy's "La Belle aux cheveux d'or", or "The Story of Pretty Goldilocks".