Temporarily transpose Z (twice) and Y so we can work down columns instead of across rows.