A Squeeze-Trim-Endplay (Book Hand)

This is from Adventures in Card Play, by Ottlik and Kelsey. The opening lead is revised.
QJ543
KQ6
7
AQJ10

K972
AJ74
AQJ
K6
The contract is 6NT, and the opening lead is a club. This hand is a cute sure-trick problem -- how do you make 6NT against any distribution (and an opening heart lead)? But I will treat it as a hand from play.

Obviously, if spades are not 4-0, the hand is simple. So, what if they are?

Discussion/Answer