The best way to attack this layout is to start by assuming spades are not 3–2, because if they are, you can make an overtrick: ♥A, ♣A, ♠A, club ruff, draw trumps and run the spades.
The best (and the winning) line is to duck the opening lead to East’s 9 and win the high heart return with dummy’s ace, and play the ♦K Q.
If East shows out on the first or second diamond, spades are breaking, so cross to the ♦A, return to the ♠A, draw trumps and run the spades.
If East follows to two diamonds, spades are not breaking 3–2. In fact, you have to assume that East has exactly two diamonds as you cannot make 6♦ if he has three diamonds and is void in spades. (With that holding, he might have doubled 6♦).
Cash the ♠A K Q, ruff a spade, establishing dummy’s fifth spade, and cross to the ♦A leaving:
When you play dummy’s spade (discarding a heart), East is caught in a ruffing squeeze. If he discards a heart, ruff a heart setting up dummy’s jack, and cross to the ♣A to cash it. If he discards a club, cash the ♣A, ruff a heart and the ♣Q is the 12th trick. In order to arrive at this ending, you must duck the opening lead to adjust the timing, your first key play.
Thanks to Tim Bourke, Australia, for this one.