If you didn’t come up with a 100% play, go back and try again.
Start by cashing three high diamonds and crossing to a high club. If West started with four diamonds, cash the ♦J and discard a club. (If diamonds were 3–2, cashing a fourth diamond is optional.)
Next lead a spade from dummy. If East plays low, stick in the 7 and claim! After winning the spade cheaply, what can West play? Either major-suit return gives you a 12th trick even if clubs don’t break, and a club return means you have four club tricks or 12 in all. (If East shows out on West’s club exit, you can return to your hand to take the marked finesse.)
Clearly, therefore, East must stick in some intermediate spade to prevent you from inserting the 7. Say East plays the ♠8. Win the king (or ace), cross back to a club (West showing out, or else the play is over) and lead a second spade intending to play the 7 if East follows low. Say East sticks in the ♠9 this time. Cover with the jack and West is endplayed. A spade return goes into the A–7 for your 12th trick. A heart return gives you 12, too.
After either major suit is returned, you can get rid of your other major-suit loser on dummy’s remaining diamond by crossing to dummy with a club.
The trap is to not play two rounds of clubs prematurely to see whether they break. You may need two club entries to lead spades twice, and a third to get back to dummy to cash the fifth diamond, a trick that cannot be cashed earlier without squeezing your hand.
Thanks to N. Scott Cardell, Pullman WA, for this neat problem.