The crux of the deal is avoiding a second diamond loser. In isolation, the best play in diamonds is to finesse the 9 on the first round. This succeeds immediately when East holds the ♦J 10 because the 9 will force West’s king. When the 9 loses to the jack or 10 from West, you finesse the queen next time. This gives you two chances, but that line fails on this layout:
The way to overcome this arrangement is to eliminate the clubs and hearts before touching diamonds. The only trap is failing to manage the entries required to bring this about.
You must ruff three hearts to eliminate the suit and then return to dummy to lead diamonds, so you need four entries in all. After taking the opening lead with the ♥A, you immediately ruff a heart high and lead another high trump to dummy’s ace. A third heart ruffed high eliminates the suit, as planned, and you will still have the ♠4 left. Use it to cross to dummy with the ♠8 to ruff dummy’s last heart, thereby eliminating the suit.
The ♣K and a club to the ace removes the clubs and returns you to dummy for a fourth time.
Now it is time to play a diamond and cover East’s card. East will likely play the 8, West takes the 9 with the jack but is endplayed for his troubles. He has the choice of giving you your 12th trick by returning a diamond into your tenace or playing a club, which gives you a ruff-and-discard. In that case you throw a diamond from dummy and ruff in your hand. After cashing the ♦A at trick 12 you make the last trick with dummy’s remaining trump.
The result is the same if East plays the ♦10 on the first round of the suit. West takes the queen with the king, but your ♦A 9 is now a tenace and you will still be able to hold your diamond losers to one if West returns a diamond.
You should thank West for not leading a trump. It destroys the entries necessary to bring off the above elimination and endplay on the given layout..