Two Ways

8 7 6 5
8 2
7 6 4 3 2
Q 7
A Q 4 10 3 2
K Q 7 6 5 3 J 10 9 4
9 Q 10
10 8 5 J 9 6 4
K J 9
A
A K J 8 5 Contract: 5 diamonds
A K 3 2 Opening lead: K of hearts

There are two ways of making the hand, neither one tried by this declarer. Opening lead was the K of hearts, willy-nilly won by the ace. Two trump leads drew all defensive trump, at which declarer went to the Q of clubs and finessed the J of spades into the Q. Back came a heart lead, ruffed in the closed hand, at which declarer cashed the A, K of clubs and ruffed a club. Now he came back and finessed the K of spades into the ace, and a spade return to the 10 finished off declarer. Down one.
One way to make it is to start finessing with the lowest spade, coming back with a finesse of the J if that draws only the 10. This works if East has either the 10 or the Q and if he has a doubleton ace. This is somewhat analogous to three small opposite A Q 10. I've seen declarers throwing away a valuable trick by "successfully" finessing the Q, first round. But now LHO has K and J, and declarer must cough up a trick in the suit.
But there is a better way, which in fact works even if West has the A Q 10! And that is a strip-and-endplay, which is often feasible when you have a lotta trump in each hand and a tenace position you must break open. After two rounds of trump, go to the Q of clubs, ruff a heart with the 8, cash the A, K of clubs and ruff a club. You now have two trump in each hand (two leads and a ruff in each hand), no hearts and no clubs left.
You now lead a spade to the J. West might be able to cash two tricks, or cash one and lead to his partner's ace, but there is no way the defense can take three spade tricks. Either it will cough up a sluff & ruff after two tricks, or will establish a good K and lead to it.

It's a long shot, but I recommended ruffing a heart with the 8 and finessing the J, not the 9 of spades, on the strip-and-endplay because East just might hold the A Q. The J wins, and now on a trump re-entry to dummy, a low spade makes the K a winner. But wait a minute! Suppose instead of A Q, East has Q 10. Now the 9 brings the ace, and a trump re-entry allows a lead toward the K J. True enough. So finesse the 9, finesse the J. The odds seem to be the same either way. But trumping dummy's second heart with the 8 is necessary in either case.