Ruff on table, unblocking the ace of hearts. Now play a spade to the queen, and cash the ace. Play the ace of clubs, and exit with a low heart, throwing a diamond from table. West has to continue playing hearts, and on the first two rounds you throw another two diamonds from dummy, and clubs from hand. Then ruff the next heart on table, and throw your last club from hand.
Dummy now has a spade, the ace of diamonds, and three clubs. Declarer has three diamonds and two trumps. East has only five cards left, so he has at most two cards in one minor suit. If it is clubs, ruff the club suit out, using the ace of diamonds and a trump as entries to hand. If it is diamonds, unblock the ace of diamonds, and ruff out that suit instead.
A slightly tricky version of a known theme.