Opening lead: ♠Q. Plan the play, and while you’re at it, plan the play for 6♦ and 7♦ as well!
Let’s start with 5♦. Win the ♠A, cash the ♥A, play the ♦K and ♦A, ruff a low heart and ruff a spade back to your hand.
You now remain with the ♦J 7 and the ♥K J 6 4, dummy void in both red suits. Assuming diamonds were 3–2 and no queen has appeared, play the ♥K. At this point you are home as long as neither defender started with five hearts headed by the queen. If hearts are 3–3 or if the ♥Q has dropped doubleton, you make six, losing one diamond trick.
If hearts are 4–2, no queen popping up, concede a heart and wind up losing a heart and a diamond.
If the ♦Q was doubleton, cash the ♦J and then the ♥K. If hearts are 3–3 or the ♥Q was doubleton you make seven! Why didn’t you bid more?
Lastly, if diamonds are 4–1, nobody having a singleton queen, you are going to need hearts to be 3–3 or the ♥Q doubleton to make your contract.
Now for 6♦ and 7♦. These contracts should be played identically: ♠A, ♥A, diamond to the jack. In 6♦ you can afford to lose this finesse if diamonds are 3–2 and hearts are 3–3 or the queen is doubleton. Say West wins and returns a spade. You ruff, ruff a low heart, cash the ♦K, ruff a spade and now the ♦A, drawing everybody’s trumps including yours! You are down to the ♥K J 6 4 and need the suit to divide 3–3 or the ♥Q having dropped doubleton. If the diamond finesse wins, and diamonds are 4–1, hang in there, it’s not over. After winning the ♦J, ruff a heart, cash the ♦K and ruff a spade back to your hand. You are down to the ♦A 7 and the ♥K J 6 4, East having the doubleton ♦Q. Play the ♦A and then the ♥K. You know what you need: hearts 3–3 or the ♥Q doubleton.
In 7♦ you must find the diamonds 3–2 with the queen onside: ♠A, ♥A, ♦J, heart ruff, ♦K, spade ruff, ♦A. Now if hearts come in for no losers, you make your grand.
Opening lead: ♠4 (fourth-best leads). East plays the king. Plan the play.
You can’t bring in the diamonds if they are 2–1 unless the queen is singleton. You can’t bring in the diamonds if diamonds are 3–0 unless West has the length and covers the jack. If East has three diamonds, you must give up the lead to East when West shows out. But If you give up a diamond trick to run the suit, you run the risk of losing four spade tricks. What is to become of you?
The theme has been well documented, but it can’t hurt to go over it again. Win the second spade and lead the ♦J, intending to play the ace if West plays low.
An inexperienced West may cover with Q–x or Q–x–x, liberating the suit for seven tricks. Of course you may have to deal with West squirming before ducking. Say West plays low and you rise with the ace and East plays low. The queen is at large and it will fall under the king, but it doesn’t do you any good because the @%$#! diamond suit is still blocked. Not to worry. Lead dummy’s remaining spade and discard a diamond, unblocking the suit. Assuming spades are no worse than 5–3 (as indicated by the lead), the opponents can take four spade tricks, but now your diamonds are all winners (after you play the king). You wind up with at least nine tricks.