Once upon a time, in a land Down Under, two great rivals had scheduled a duel. They were not fighting over a grand prize - the cup did not even have a name - but something far more important. Theirs was a battle for honour. Both had strong sporting prowess and both had plenty to prove.
The hosts, Australia, had just returned from a humbling in Sri Lanka where they had to give up the crown they had worn for just a few months. They were ranked No.1 before that trip, buoyed by a satisfying home summer, but like the Emperor who thought he was clad in finery, their batting was actually bare.
The challengers, South Africa, were embarking on their first mission since they were humiliated in India with their first away series loss in nine years. The months after that sent them reeling - a home defeat to England, an early exit from the World T20 and an off-field overhaul that put the focus on a change in team make-up through transformation. They arrived like Princess Aurora, asleep but still attractive.
Still, something stirred in South Africa early on, which suggested they were ready to shake their last-season slumber. Their spearhead Dale Steyn threatened to push the opposition's Humpty Dumpty off the wall. He said that would cause the body to fall but in a cruel twist, it was his own shell that could not be put back together again.
The king's other soldiers and the king's other men had to go out on their own and Vernon Philander, Kagiso Rabada and Keshav Maharaj accepted the task. A stirring comeback allowed the two stepsisters of the WACA - JP Duminy, whose career was born there eight years ago but had returned on life support, and Dean Elgar, whose career could have been stillborn there four years ago - to go to the ball. When midnight came, they had both scored hundreds and another little star was twinkling too. Temba Bavuma effected the run-out that started the second Australian collapse and led to the unlikeliest of South African wins.
Australia were caught off guard but they promised not to make any changes. Rod Marsh and Darren Lehmann's noses grew as the words came out. They were proved Pinocchios when Australia made three changes for the second battle.
Fee-fi-fo-fum , Philander smelled the blood of an Australian. He turned the Hobart pitch into a magic carpet, rolled back the years, and claimed his first five-for on the road since Lord's 2012. Australia were all out for 85, which made for better reading than their 47 four years ago but would have felt a lot worse.
All the better to rub your nose in it then, my dear, thought Quinton de Kock and Kyle Abbott. De Kock racked up a fifth consecutive score of fifty or more; Abbott claimed a nine-wicket match haul in his eighth Test over three years. South Africa had found a way to make stone soup, while Australia's pot was still boiling.
Too hot, too cold and nowhere near just right, explained the golden-locked Steven Smith. "If there is anything in the wicket - spin, swing, seam - at the moment, we are not adapting well enough. We are not willing to grind it out."
A trail of mints leading to a ball-tampering allegation shone in the moonlight but unlike Hansel and Gretel, the Australian team had no interest in following it. The ICC, however, did. It was alerted to the footage through media reports and laid a charge against the victorious stand-in captain Faf du Plessis, turning him from hero to villain. Despite carrying a previous conviction for this offense, he cried wolf and so did his cricket board.
"Everybody does it," they bellowed. "The term artificial is not clear," they said. "Ball shining is different to ball tampering," they pleaded. They huffed and puffed but they could not blow the house down. Match referee Andy Pycroft found du Plessis guilty. The punishment was not harsh enough to prevent du Plessis from playing the Adelaide Test, a fixture that could lead to a pot of gold at the end of a slightly different-coloured rainbow.
South Africa were chasing a whitewash in a game that would be played with a pink ball. They would have to beat another new-look Australian side to do that. The hosts had replaced grumpy, sleepy, dopey and sneezy with driven, determined, defiant and daring. Their fresh faces saved their snow whites with a consolation win in which their Rapunzel, Usman Khawaja, let down his long hair. He made South Africa's attack toil, for only the second time in the series, and scored a century to finish as the series' top-scorer.
South Africa won't leave too disappointed, though. After everything, they have plenty to celebrate. After du Plessis turned Cinderella, with a redeeming century, even their ugly duckling, Stephen Cook, whose technique was written off and career looked over, became a swan.
In Perth and Hobart, Sleeping Beauty woke up; in Adelaide, the Emperor found a clever little tailor to begin stitching the basics of a new wardrobe and in the end, they all lived happily ever after. At least until the next series.

Firdose Moonda is ESPNcricinfo's South Africa correspondent