Palo Alto Networks interview question

Logic question with matrix of 3D array