When declarer can't see a road to success in his contract, it's often a good idea to cash all of his winners, including his last trump (in a trump contract). This will sometimes create an impossible situation for the defenders.
East won the opening trump lead with the ace and continued the suit. South won this in his hand with the king and ruffed a low spade with dummy's last trump. Declarer led a diamond to his jack for a winning finesse, and drew the last trump. It looked like he had three sure losers remaining, but he tried the effect of cashing both of his diamond winners and his last two trumps, leaving this position:
East still had to discard and chose his low club. South exited with a club to dummy's 10, losing to the jack. East cashed the king of clubs, but declarer discarded his low spade. East was forced to lead a spade from the king and South took the finesse for his contract. Well done!