Three soldiers, starving in a cornfield, are offered a whip that produces money from the Devil, an aspiring poet. He decides to test out his riddle-making skills, and challenges that if they cannot solve his riddle in seven years, their souls are his.
Seven years later, the soldiers enlist the help of the Devil's grandmother to help them solve the riddle. She feels bad for them and says she will ask him about it, so they can overhear from the basement. It is the day before the Devil's birthday, so he and grandmother celebrate, and she asks him about the riddle.
On the day of the Devil's 666th birthday, June 6th, he shows up to collect the soldiers souls. They solve the riddle correctly, and the Devil flees in humiliation and heartbreak. It has truly been the worst birthday he's ever had.